It seems to me that PHP5.1.1 doesn't go well with MySQL 4.1.16
in handling 2 byte sjis coded japanese character.
SET NAMES 'sjis' command doesn't work in the following PHP script.
Before and afer this command, the current characer set remains the same as latin1-swedish, while server and databese character set are set to sjis.
I've been struggling in vain to resolve this mojibake problem.


$link    = mysql_connect('localhost', 'sampuser', 'tbnq0206')
   OR die(mysql_error());
$charset = mysql_client_encoding($link);

echo "The current character set is : $charset\n";

mysql_query("SET NAMES 'sjis'", $link);
$charset = mysql_client_encoding($link);

echo "The current character set is : $charset\n";

Cheers,
Kiyoshi Inoue
--
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to