Bug #68414 [NEW]: Yet another strtolower/upper problem in tr_TR

From: Date: Thu, 13 Nov 2014 14:02:10 +0000
Subject: Bug #68414 [NEW]: Yet another strtolower/upper problem in tr_TR
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188577@lists.php.net to get a copy of this message
From: julien at palard dot fr Operating system: all PHP version: 5.5.18 Package: *Languages/Translation Bug Type: Bug Bug description:Yet another strtolower/upper problem in tr_TR Description: ------------ Lots of bugs have beed opened on this subject, lots of bugs have beed closed / resolved / etc : https://bugs.php.net/search.php?search_for=turkish&boolean=0&limit=30&order_by=&direction=DESC&cmd=display&status=All&bug_type=All&project=All&php_os=&phpver=&cve_id=&assign=&author_email=&bug_age=0&bug_updated=0 Those bugs typically address iso8859-9, the latin-5 character encoding used in Turkey, this one addresses the UTF8 encoding: In turkish: SMALL I capitalized is CAPITAL I WITH DOT ABOVE (and vice-versa) SMALL DOTLESS I capitalized CAPITAL I (and vice-versa) In PHP I got (see test script) Expects CAPITAL I WITH DOT ABOVE: iI Expects SMALL I WITHOUT DOT: Ii Which is, more or less, wrong for the 4 tests. Test script: --------------- <?php mb_internal_encoding('UTF-8'); setlocale(LC_ALL, 'tr_TR.UTF-8'); echo "Expects CAPITAL I WITH DOT ABOVE: " . strtoupper('i') . mb_strtoupper('i', 'UTF-8') . PHP_EOL; echo "Expects SMALL I WITHOUT DOT: " . strtolower('I') . mb_strtolower('I', 'UTF-8') . PHP_EOL; Expected result: ---------------- Expects CAPITAL I WITH DOT ABOVE: İİ Expects SMALL I WITHOUT DOT: ıı Actual result: -------------- Expects CAPITAL I WITH DOT ABOVE: iI Expects SMALL I WITHOUT DOT: Ii -- Edit bug report at https://bugs.php.net/bug.php?id=68414&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68414&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68414&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68414&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68414&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68414&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68414&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68414&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68414&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68414&r=support Expected behavior: https://bugs.php.net/fix.php?id=68414&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68414&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68414&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68414&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68414&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68414&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68414&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68414&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68414&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68414&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68414&r=mysqlcfg

« previous php.bugs (#188577) next »