#18874 [Fbk->]: Certain Japanese characters break PHP's $_GET and $_POST

From: Date: Wed, 14 Aug 2002 06:58:43 +0000
Subject: #18874 [Fbk->]: Certain Japanese characters break PHP's $_GET and $_POST
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16731@lists.php.net to get a copy of this message
ID: 18874 Updated by: yohgaki@php.net Reported By: erica@simpli.biz -Status: Feedback +Status: Won't fix Bug Type: Output Control Operating System: Windows XP PHP Version: 4.1.2 New Comment: Also note show_source() is the much better way to show sources. .phps has other issues, also. Use show_source() or like. Previous Comments: ------------------------------------------------------------------------ [2002-08-13 05:20:21] wez@php.net Also note that (for IE at least), you can force a more sensible encoding to be used by adding an ACCEPTCHARSET attribute to your form: <form acceptcharset="utf-8" ...> This will cause the data to be utf-8 encoded. And you should definitely be running with the mbstring module if you are dealing with Japanese text. ------------------------------------------------------------------------ [2002-08-13 02:40:44] fujimoto@php.net The spec of Shift_JIS (== one of the japanese encodings) causes this problem. So, probably snapshots will not solve this. As mentioned in http://www.php.net/manual/en/ref.mbstring.php, using Shift_JIS as the script encoding or internal encoding is NOT recommended. Anyway, currently we have two workarounds. 1. use EUC-JP as script encoding 2. use snapshots w/ following settings: - enable zend engine to parse shift jis ./configure --enable-zend-multibyte [and so on] - enable encoding translation add following lines to your php.ini [mbstring] mbstring.internal_encoding=euc-jp mbstring.output_encoding=shift_jis mbstring.script_encoding=shift_jis mbstring.encoding_translation=1 if you have questions about japanese encoding, please ask me directly (because here is not suitable place to do that). ------------------------------------------------------------------------ [2002-08-13 02:15:32] rasmus@php.net Actually, he probably meant the latest snapshot from snaps.php.net ------------------------------------------------------------------------ [2002-08-13 02:07:13] erica@simpli.biz Still a bug in a fresh compile of 4.2.2 (on a friend's system.) His phpinfo(): http://redline.worldforge.org/en/info.php The script: http://redline.worldforge.org/hottie/contact2.php Thanks. ------------------------------------------------------------------------ [2002-08-13 01:05:28] kalowsky@php.net Does this still happen with a newer version of PHP? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18874 -- Edit this bug report at http://bugs.php.net/?id=18874&edit=1

« previous php.bugs (#16731) next »