Edit report at https://bugs.php.net/bug.php?id=65110&edit=1

 ID:                 65110
 Updated by:         fel...@php.net
 Reported by:        f133715 at rmqkr dot net
 Summary:            mb_convert_encoding's auto is not work, when using
                     mbstring.language=English
-Status:             Open
+Status:             Assigned
 Type:               Bug
 Package:            mbstring related
 Operating System:   Windows
 PHP Version:        5.4.16
-Assigned To:        
+Assigned To:        moriyoshi
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2013-06-24 12:44:21] f133715 at rmqkr dot net

Description:
------------
1. The version number of the PHP package or files you are using.
Latest PHP 5.4 for Windows

2. A short script that reproduces the problem
<test script>

Sometimes, it produce this error on log file:
Warning: mb_convert_encoding(): Unable to detect character encoding in XXX.php 
on line XXX

It seems that 'auto' is not expanding to "ASCII,JIS,UTF-8,EUC-JP,SJIS".

This is a temporary fix for me:
[TYPE A]
$out_strs = mb_convert_encoding($out_strs, "UTF-8", "ASCII,JIS,UTF-8,EUC-
JP,SJIS");

or,
[TYPE B]
mb_language("Japanese");
$out_strs = mb_convert_encoding($out_strs, "UTF-8", "auto");


Test script:
---------------
I'm Englishman, so I'm added this in php.ini;
mbstring.language = English
mbstring.internal_encoding = UTF-8

And the source code is;
$out_strs = mb_convert_encoding($out_strs, "UTF-8", "auto");

Expected result:
----------------
auto SHOULD expand to ASCII,JIS,UTF-8,EUC-JP,SJIS.
Why should I change mbstring.language = English to Japs?



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=65110&edit=1

Reply via email to