MySQL Forums
Forum List  »  PHP

strange unicode problem - big5 to utf8 in MySQL Windows (win32)
Posted by: Jerry Lee
Date: June 13, 2005 03:52AM


I am developing application using PHP/Mysql.
Application is running under PHP on Windows. And I tested it with MySQL on Windows and Linux.

The environment is:
Windows XP: Mysql 5.0.6b, PHP 5.0.4, and I am using ADODB
Linux: Mysql 4.1.11

When I do this:

# do conversion
$str = iconv("big5","utf-8", $chinese_string);
#insert it into table "sample_table1",
insert_db () # supposed so
#now select the same data out
$out = iconv("utf-8", "big5", $selected_data);

The strange thing is:
On Mysql/Linux: the $out is as same as $chinese_string
On Mysql/Windows: the $out is rather different from $chinese_string

It's really strange, even if I changed default charset on Mysql/Windows.
I tried to change table charset, and system variable about charset into utf8,
but it's still not correct.

Does anybody have the same results?
Is there anything wrong?

Please help, really appreciate it!


Options: ReplyQuote

Written By
strange unicode problem - big5 to utf8 in MySQL Windows (win32)
June 13, 2005 03:52AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.