ID: 34239 User updated by: mmingxx at yahoo dot com Reported By: mmingxx at yahoo dot com -Status: Feedback +Status: Open Bug Type: ICONV related Operating System: Linux PHP Version: 4.4.0 New Comment:
I obtained the following information from my php.ini file: iconv support: enabled iconv implementation: glibc iconv library version: 2.3.2 ---------- >From my experience, iconv converts fine between big5 and gb2312 except for the problem that I mentioned before. Previous Comments: ------------------------------------------------------------------------ [2005-08-24 22:56:06] [EMAIL PROTECTED] Are you using libiconv or glibc? Are you sure the implementation actually supports this? (it's pretty unlikely this is any bug in PHP..) ------------------------------------------------------------------------ [2005-08-24 20:18:49] mmingxx at yahoo dot com Description: ------------ Reference: string iconv ( string in_charset, string out_charset, string str ) Description: Iconv converts fine from GB2312 to Big5 if str contains only keyboard characters (e.g. [EMAIL PROTECTED]) and GB2312 encoded characters. However, if str contains Big5 encoded characters, unexpected result would return. I tried to use append //IGNORE to the end of the out_charset but it didn't work either. Same problem exists for converting from Big5 to GB2312. Reproduce code: --------------- <? echo iconv("GB2312", "Big5//IGNORE", "Big5: ¤¤¤å¦rÅé; "); echo iconv("Big5", "GB2312//IGNORE", "GB2312: ÖÐÎÄ×ÖÌå"); ?> Expected result: ---------------- Big5: ¤¤¤å¦rÅé; GB2312: ÖÐÎÄ×ÖÌå Actual result: -------------- Big5: ¡¼¡¼r¯y; GB2312: ¡¼¡¼×ÖÌå ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34239&edit=1