#23016 [Opn->Asn]: mbstring script_encoding and encoding_translation does not work.

From: Date: Wed, 16 Apr 2003 20:40:59 +0000
Subject: #23016 [Opn->Asn]: mbstring script_encoding and encoding_translation does not work.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37772@lists.php.net to get a copy of this message
 ID:               23016
 Updated by:       moriyoshi@php.net
 Reported By:      s dot masugata at digicom dot dnp dot co dot jp
-Status:           Open
+Status:           Assigned
 Bug Type:         mbstring related
 Operating System: Solaris 2.6
 PHP Version:      4.3.2RC1
-Assigned To:      
+Assigned To:      fujimoto


Previous Comments:
------------------------------------------------------------------------

[2003-04-02 05:41:17] s dot masugata at digicom dot dnp dot co dot jp

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 this bug report at http://bugs.php.net/?id=23016&edit=1



Thread (8 messages)

« previous php.bugs (#37772) next »