From:             [EMAIL PROTECTED]
Operating system: Irrelevant
PHP version:      Irrelevant
PHP Bug Type:     mbstring related
Bug description:  mbstring fails to match encoding with some locale settings

Description:
------------
mbstring fails to match encoding name against any one of 
the supported encodings with some locale settings.

Irrelevant to bug #29955.

Reproduce code:
---------------
<?php
setlocale(LC_CTYPE, 'tr_TR.ISO-8859-1');

var_dump(mb_convert_encoding('abc', 'utf-8', 'iso-8859-1'));
var_dump(mb_convert_encoding('abc', 'UTF-8', 'ISO-8859-1'));

setlocale(LC_CTYPE, 'tr_TR.ISO-8859-9');

var_dump(mb_convert_encoding('abc', 'utf-8', 'iso-8859-1'));
var_dump(mb_convert_encoding('abc', 'UTF-8', 'ISO-8859-1'));
?>

Expected result:
----------------
string(1) "a"
string(1) "a"
string(1) "a"
string(1) "a"

Actual result:
--------------
string(1) "a"
string(1) "a"

Warning: mb_convert_encoding(): Illegal character 
encoding specified in %s on line %d
string(1) "a"
string(1) "a"

-- 
Edit bug report at http://bugs.php.net/?id=32062&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32062&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32062&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32062&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32062&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32062&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32062&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32062&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32062&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32062&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32062&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32062&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32062&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32062&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32062&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32062&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32062&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32062&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32062&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32062&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32062&r=mysqlcfg

Reply via email to