php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23016 mbstring script_encoding and encoding_translation does not work.
Submitted: 2003-04-02 05:41 UTC Modified: 2003-06-04 12:48 UTC
Votes:7
Avg. Score:4.7 ± 0.7
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:2 (50.0%)
From: s dot masugata at digicom dot dnp dot co dot jp Assigned: fujimoto (profile)
Status: Closed Package: mbstring related
PHP Version: 4.3.2RC1 OS: Solaris 2.6
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: s dot masugata at digicom dot dnp dot co dot jp
New email:
PHP Version: OS:

 

 [2003-04-02 05:41 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-10 15:56 UTC] moriyoshi@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2003-05-10 15:56 UTC] moriyoshi@php.net
wrong status
 [2003-06-02 23:33 UTC] okumurya at hotmail dot com
Is this fixed by Version 4.3.2?

ChangeLog does not describe about this.
http://www.php.net/ChangeLog-4.php
 [2003-06-02 23:55 UTC] s dot masugata at digicom dot dnp dot co dot jp
Hello.

Fixed in PHP4.3.2.
Please check by PHP4.3.2...

but, the cautions of 4.3.2 are #23894/#23921.

http://bugs.php.net/bug.php?id=23894
http://bugs.php.net/bug.php?id=23921
 [2003-06-04 12:42 UTC] moriyoshi@php.net
Please do not add comments that have nothing to do with this bug report. Instead, add such comments at those relevant pages. Thanks.

 [2003-06-04 12:48 UTC] moriyoshi@php.net
okumurya at hotmail dot com: entries for the bugs found during the RC period are not supposed to go into the NEWS file.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC