From:             f133715 at rmqkr dot net
Operating system: Windows
PHP version:      5.4.16
Package:          mbstring related
Bug Type:         Bug
Bug description:mb_convert_encoding's auto is not work, when using 
mbstring.language=English

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 bug report at https://bugs.php.net/bug.php?id=65110&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65110&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65110&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=65110&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65110&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65110&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65110&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65110&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65110&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65110&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65110&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=65110&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=65110&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65110&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65110&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65110&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65110&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65110&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65110&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65110&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65110&r=mysqlcfg

Reply via email to