Req #67815 [Com]: strtolower/upper should be locale unaware for Turkish I
| From: | ongun dot kanat at gmail dot com | Date: | Mon, 11 Aug 2014 14:11:03 +0000 |
| Subject: | Req #67815 [Com]: strtolower/upper should be locale unaware for Turkish I | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-187074@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67815&edit=1
ID: 67815
Comment by: ongun dot kanat at gmail dot com
Reported by: ongun dot kanat at gmail dot com
Summary: strtolower/upper should be locale unaware for
Turkish I
Status: Open
Type: Feature/Change Request
Package: Strings related
Operating System: Linux
PHP Version: 5.5.15
Block user comment: N
Private report: N
New Comment:
I looked the bug below and found that the issue is 12 years old bug!
https://bugs.php.net/bug.php?id=18556
Although it's tagged closed and in the last comment [jpauli at php dot net] said it is fixed,
it still exists.
There is a RFC in wiki but it is about mbstring plugin as I see.
https://wiki.php.net/rfc/multibyte_char_handling?s[]=turkish
Maybe the functions strtolower/strtoupper would work for ASCII as default and a locale parameter for
other charsets. It will solve the most of the class loading problems in Turkish locale.
Previous Comments:
------------------------------------------------------------------------
[2014-08-10 07:36:08] fa@php.net
Related bugs:
https://bugs.php.net/bug.php?id=18556
https://bugs.php.net/bug.php?id=21771
https://bugs.php.net/bug.php?id=18556
https://bugs.php.net/bug.php?id=29955
Maybe there should be a FAQ entry on the wiki?
------------------------------------------------------------------------
[2014-08-09 18:44:22] ongun dot kanat at gmail dot com
Description:
------------
There are many applications written that uses strtoupper/strtolower like phpMyAdmin. The Turkish
'I','i' causes errors in these applications since strtolower and strtoupper
rejects the 'I'->'i'/'i'->'I' conversation on systems
with locale "tr_TR.UTF-8". The function may be locale unaware.
Test script:
---------------
<?php
header("Content-type:text/plain; charset=UTF-8");
echo strtolower("I") . "\n" . strtoupper("i");
Expected result:
----------------
i
I
Actual result:
--------------
I
i
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67815&edit=1