Re: Japanese katakana "SO" in SJIS gives problems.

From: Date: Mon, 24 Nov 2003 04:15:48 +0000
Subject: Re: Japanese katakana "SO" in SJIS gives problems.
References: 1  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-637@lists.php.net to get a copy of this message
Hi, Turning off magic_quotes_gpc in your php.ini will fix that problem. When doing this, be sure to escape any incoming strings that will be get through to the database as SQL with a function provided by the extension with which you actually make connection to the database (e.g. mysql_real_escape_string() or pg_escape_string()) instead of addslashes(), whose usage is by no means recommended when it comes to multibyte string. Please refer to the archive for detailed information about SJIS weirdness, as I already posted something to the thread of a relevant topic. Moriyoshi On 2003/11/19, at 19:27, Jean-Christian IMbeault wrote:
I'm having trouble with POST form data being passed to me in Japanese. The incoming data is in SJIS and if someone enters the japanese katakana "SO" it somehow ends up being turned up in to "SO\". Here is an example: User enters "ソ" PHP says the POST values is: POST['name'] = ソ\ Where did that last character come from? This is a big problem for me if people enter words in katakana containing the character "SO". For example "software" gets an extra backslash inserted after the so ... Does anyone have a safe solution to this problem?


« previous php.i18n (#637) next »