#29955 [Opn->Ana]: mb_strtoupper() / lower() broken with some locale
| From: | moriyoshi@php.net | Date: | Tue, 22 Feb 2005 10:10:07 +0000 |
| Subject: | #29955 [Opn->Ana]: mb_strtoupper() / lower() broken with some locale | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74411@lists.php.net to get a copy of this message | ||
ID: 29955
Updated by: moriyoshi@php.net
-Summary: mb_strtoupper() / lower() broken with iso-8859-9
Reported By: jan at horde dot org
-Status: Open
+Status: Analyzed
Bug Type: mbstring related
Operating System: Linux
PHP Version: 4CVS-2004-09-02 (stable)
New Comment:
It turned out this is because mbstring doesn't take the
locale into consideration.
Previous Comments:
------------------------------------------------------------------------
[2005-02-21 20:51:07] jan at horde dot org
No, this didn't change anything.
------------------------------------------------------------------------
[2005-02-21 11:02:02] moriyoshi@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2004-09-02 17:15:42] jan at horde dot org
Description:
------------
In ISO-8859-9 (Turkish) the uppercase letter of "i" is a dotted
uppercase "I", the lowercase letter of "I" is a dotless "i". But
mb_strtolower() und mb_strtoupper() simply return the ASCII uppercase
or lowercase counterparts.
You get the correct result with:
setlocale(LC_ALL, 'tr_TR');
echo strtoupper('i');
echo strtolower('I');
But the wrong results with:
echo mb_strtoupper('i', 'iso-8859-9');
echo mb_strtolower('I', 'iso-8859-9');
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29955&edit=1