From: s dot masugata at digicom dot dnp dot co dot jp Operating system: Solaris 2.6 PHP version: 4.3.2RC1 PHP Bug Type: mbstring related Bug description: mbstring script_encoding and encoding_translation does not work.
mbstring script_encoding and encoding_translation does not work. The following is the result of a phpinfo, and as a result of execution. php.ini: output_buffering = On output_handler = mb_output_handler mbstring.language = Japanese mbstring.internal_encoding = EUC-JP mbstring.encoding_translation = On mbstring.http_input = auto mbstring.http_output = SJIS mbstring.detect_order = auto mbstring.substitute_character = none mbstring.func_overload = 0 mbstring.script_encoding = SJIS phpinfo: System SunOS hogehuga 5.6 Generic_105181-23 sun4u Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--without-pear' '--disable-cgi' '--disable-cli' '--enable-zend-multibyte' '--enable-mbstring=all' '--enable-mbregex' '--with-mysql=/usr/local/mysql' '--with-pgsql=/usr/local/pgsql' '--enable-ftp' '--enable-sockets' '--enable-bcmath' '--enable-wddx' '--enable-versioning' Apache Version Apache/1.3.26 output_buffering 1 1 output_handler mb_output_handler mb_output_handler mbstring Multibyte Support enabled Japanese support enabled Simplified chinese support enabled Traditional chinese support enabled Korean support enabled Russian support enabled Multibyte (japanese) regex support enabled Directive Local Value Master Value mbstring.detect_order auto auto mbstring.encoding_translation On On mbstring.func_overload 0 0 mbstring.http_input auto auto mbstring.http_output SJIS SJIS mbstring.internal_encoding EUC-JP EUC-JP mbstring.language Japanese Japanese mbstring.script_encoding SJIS SJIS mbstring.substitute_character no value no value test-euc1.php( describes EUC ): <? echo "describes EUC of multibyte."; //phpinfo( ); ?> [[ OK!! ]] Operation which is not expected. test-euc2.php( describes EUC ): <? declare( encoding="EUC-JP" ); echo "describes EUC of multibyte."; //phpinfo( ); ?> [[ OK!! ]] Operation as expected. test-sjis1.php( describes SJIS ): <? //@mb_internal_encoding( "SJIS" ); echo "describes SJIS of multibyte."; //phpinfo( ); ?> [[ NG!! ]] Operation which is not expected. test-sjis2.php( describes SJIS ): <? declare( encoding="SJIS" ); //@mb_internal_encoding( "SJIS" ); echo "describes SJIS of multibyte."; //phpinfo( ); ?> [[ NG!! ]] Operation which is not expected. If test-sjis1.php and test-sjis2.php confirm the portionmade comment out: mb_internal_encoding( "SJIS" ) It operated somehow. internal_encoding considers whether to be because for this not to be effective. Moreover, the portion of automatic conversion of an http_input does not become operation which also expected this in strange operation, either. This is very severe. Moreover, this problem does not arise in php4.2.2. ( The internationalization version ) In the case of other OS's: OS :RedHat Linux6.2J Apache:1.3.27 It is satisfactory. The result of the mbstring relation of phpinfo the same. test-euc1.php( describes EUC ): <? echo "describes EUC of multibyte."; //phpinfo( ); ?> [[ NG!! ]] Operation as expected. test-euc2.php( describes EUC ): <? declare( encoding="EUC-JP" ); echo "describes EUC of multibyte."; //phpinfo( ); ?> [[ OK!! ]] Operation as expected. test-sjis1.php( describes SJIS ): <? //@mb_internal_encoding( "SJIS" ); echo "describes SJIS of multibyte."; //phpinfo( ); ?> [[ OK!! ]] Operation as expected. test-sjis2.php( describes SJIS ): <? declare( encoding="SJIS" ); //@mb_internal_encoding( "SJIS" ); echo "describes SJIS of multibyte."; //phpinfo( ); ?> [[ OK!! ]] Operation as expected. The portion of automatic conversion of an http_input is also especially satisfactory. This problem has a problem in the others instead of the problem of mbstring? Thank you. -- Edit bug report at http://bugs.php.net/?id=23016&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23016&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23016&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23016&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23016&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23016&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23016&r=support Expected behavior: http://bugs.php.net/fix.php?id=23016&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23016&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23016&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23016&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23016&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23016&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23016&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23016&r=gnused