utf8_encode arabic text
| From: | Nathalie Boulos | Date: | Fri, 11 Apr 2003 10:31:17 +0000 |
| Subject: | utf8_encode arabic text | ||
| Groups: | php.i18n | ||
| Request: | Send a blank email to php-i18n+get-533@lists.php.net to get a copy of this message | ||
Hello all,
I'm using PHP-4.2.2 to access a unicode postgresql database through a web interface on a RedHat Linux server.
I'm using arabic and french characters in the DB.
In the php.ini file, i have spécified the default charset to:
default_charset = "utf-8"
I need to import and export CSV files in and out of the unicode database. CSV are edited in MS Excel on a windows 2000. The script that does the import/export is written in PHP and the end user can access the program through HTML web page.
I'm using utf8_encode() and utf8_decode() functions to encode/decode strings read from the CSV file before/after appending/querying the database.
The french characters are correctly read in an HTML interface, and in a CSV file generated from the database (opened in excel).
My problem is with the arab text.
1.When i insert a CSV file with arab text after utf8_encoding in the database, i cannot view properly the inserted record on my web interface.
2. when i append the database using PHP via an HTML form with arabic test, and i try to import a CSV file of the appended table to Excel, the arabic words are marked with ?????
But the display of the inserted record in the browser is OK.
So, i don't know why I'm facing this problem converting arabic characters from ISO-8859-6 (I guess it's the encoding used by Excel) to UTF-8
I would greatly appreciate any suggestion and thank you in advance.
Best regards
Nathalie
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail