Bug #79048 [Nab]: Turkish Capital [İ] Error in mb_strtolower();

From: Date: Tue, 31 Dec 2019 18:44:58 +0000
Subject: Bug #79048 [Nab]: Turkish Capital [İ] Error in mb_strtolower();
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224639@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79048&edit=1 ID: 79048 Updated by: requinix@php.net Reported by: root at baransel dot dev Summary: Turkish Capital [İ] Error in mb_strtolower(); Status: Not a bug Type: Bug Package: mbstring related Operating System: MacOS 10.15.2 PHP Version: 7.4.1 Assigned To: cmb Block user comment: N Private report: N New Comment: > Can you please explain me why it works with PHP 7.2.0 - 7.2.26 and not with 7.3.0 - 7.4.1? Because your understanding of how uppercasing and lowercasing of the Turkish i/I works has not stayed up to date with the latest Unicode rules. Ask Google for more information. Previous Comments: ------------------------------------------------------------------------ [2019-12-31 10:08:02] root at baransel dot dev Can you please explain me why it works with PHP 7.2.0 - 7.2.26 and not with 7.3.0 - 7.4.1? They both output something different. ------------------------------------------------------------------------ [2019-12-31 09:56:16] cmb@php.net Your assumption that İ would not be lowercased is wrong[1]. It is, however, not lowercased as LATIN SMALL LETTER I, but rather as LATIN SMALL LETTER I and COMBINING DOT ABOVE which is correct. [1] <https://3v4l.org/BGP68> ------------------------------------------------------------------------ [2019-12-31 09:36:33] root at baransel dot dev Description: ------------ as 3v4l.org shows Output for 7.2.0 - 7.2.26 works like expected but Output for 7.3.0 - 7.4.1 does not. mb_strtolower(), cannot undercase the letter İ, please have a look at the example. Test script: --------------- <?php $program['bolum'] = '3. Sİezon 7. Bölüm'; var_dump(mb_strtolower($program['bolum'])); if(strpos(mb_strtolower($program['bolum']), 'siezon')){ var_dump('Baransel'); } https://3v4l.org/b6C08 Expected result: ---------------- I want the function to return me the undercase for letter İ e.g. 3. siezon 7. bölüm Actual result: -------------- This is what it outputs 3. si̇ezon 7. bölüm ------------------------------------------------------------------------ [2019-12-31 09:19:38] root at baransel dot dev Description: ------------ --- From manual page: https://php.net/security.hiding --- as 3v4l.org shows Output for 7.2.0 - 7.2.26 works like expected but Output for 7.3.0 - 7.4.1 does not. mb_strtolower(), cannot undercase the letter [İ], please have a look at the example. Test script: --------------- <?php $program['bolum'] = '3. Sİezon 7. Bölüm'; if(strpos(mb_strtolower($program['bolum']), 'siezon')){ var_dump('Baransel'); } https://3v4l.org/qLP4q Expected result: ---------------- I want the function to return me the undercase for letter [İ] Actual result: -------------- This is the result i'm getting => si̇ezon ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79048&edit=1

« previous php.bugs (#224639) next »