#32062 [Opn->Fbk]: mbstring fails to match encoding with some locale settings
| From: | iliaa@php.net | Date: | Tue, 22 Feb 2005 14:25:04 +0000 |
| Subject: | #32062 [Opn->Fbk]: mbstring fails to match encoding with some locale settings | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74420@lists.php.net to get a copy of this message | ||
ID: 32062
Updated by: iliaa@php.net
Reported By: moriyoshi@php.net
-Status: Open
+Status: Feedback
Bug Type: mbstring related
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
tr_TR == Turkish, and ISO-8859-1 is not a valid character set of that
locale, no?
Previous Comments:
------------------------------------------------------------------------
[2005-02-22 06:55:52] moriyoshi@php.net
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 this bug report at http://bugs.php.net/?id=32062&edit=1