Re: Japanese katakana "SO" in SJIS gives problems.
Moriyoshi Koizumi <[email protected]>
| Newsgroups | gmane.comp.php.internationalization |
|---|---|
| Message-ID | <[email protected]> |
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? -- PHP Internationalization Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php