Req #70072 [NEW]: Add a language avare uppercase/lowercase solution without need of locale change

From: Date: Tue, 14 Jul 2015 13:14:09 +0000
Subject: Req #70072 [NEW]: Add a language avare uppercase/lowercase solution without need of locale change
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194435@lists.php.net to get a copy of this message
From: ongun dot kanat at gmail dot com Operating system: any PHP version: Irrelevant Package: mbstring related Bug Type: Feature/Change Request Bug description:Add a language avare uppercase/lowercase solution without need of locale change Description: ------------ Using many languages in one page(at the same time) is possible when your clients work globally/multilingual. And sometimes developers like me are struggling in implement a page uses/modifies strings from many languages at the same time. And sometimes it's just meaningless to change locale of whole page for just one string. It would be awesome a parameter to change language in mbstring upper/lowercase operations. Example case I am displaying a page in English but also displaying strings in languages below: ß -> SS in German, ı->I in Turkish Unicode already has mappings for chars and special cases. http://unicode.org/faq/casemap_charprop.html#1 Test script: --------------- <?php mb_internal_encoding("UTF-8"); echo mb_strtoupper("Maß\n"); // "MAß" echo mb_strtolower("MAẞ\n"); // "maß" echo mb_strtoupper("ilaç\n"); // "ILAÇ" echo mb_strtolower("IŞIK\n"); // "iŞik" ?> Expected result: ---------------- MASS // Eszett maß İLAÇ // Turkish I issue ışık Actual result: -------------- MAß maß ILAÇ iŞik -- Edit bug report at https://bugs.php.net/bug.php?id=70072&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70072&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70072&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70072&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70072&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70072&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70072&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70072&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70072&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70072&r=support Expected behavior: https://bugs.php.net/fix.php?id=70072&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70072&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70072&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70072&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70072&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70072&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70072&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70072&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70072&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70072&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70072&r=mysqlcfg

« previous php.bugs (#194435) next »