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

From: Date: Wed, 30 Jun 2021 15:26:17 +0000
Subject: Bug #79048 [Com]: Turkish Capital [İ] Error in mb_strtolower();
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234704@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 Comment by: qdinar at gmail dot com 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: i googled about this. "turkish i COMBINING DOT ABOVE" (without quotes) gave not proper result in first page. when i tried "turkish i COMBINING DOT ABOVE case folding" there is https://bugs.python.org/issue34723 as 2nd result. and it gives link to https://unicode.org/Public/UNIDATA/SpecialCasing.txt . Previous Comments: ------------------------------------------------------------------------ [2020-01-01 13:05:58] cmb@php.net See also <https://www.php.net/manual/en/migration73.new-features.php#migration73.new-features.mbstring>. ------------------------------------------------------------------------ [2019-12-31 18:44:58] requinix@php.net > 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. ------------------------------------------------------------------------ [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 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=79048 -- Edit this bug report at https://bugs.php.net/bug.php?id=79048&edit=1

« previous php.bugs (#234704) next »