How to set the sjis environment for PHP5.1 and MySQL4.1

"Kiyoshi Inoue" <[email protected]>
Newsgroups gmane.comp.php.internationalization
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.