|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2018-12-30 16:21 UTC] sjon at hortensius dot net
Description: ------------ I found this while going through https://3v4l.org/bughunt/7.3.0/7.2.13+7.2.12 it seems special characters are carried over to the next character when using mb_strtolower Test script: --------------- See https://3v4l.org/7pP2v and the scripts that it's based on echo mb_strtolower("MOZAİK"); Expected result: ---------------- mozaik Actual result: -------------- mozai̇k PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
You can fix this creating a simple function of turkish chars if you need to use this in 7.3 version. <?php $var = "MOZAİK"; function TurkishFix($inputText) { $search = array('ç', 'Ç', 'ğ', 'Ğ', 'ı', 'İ', 'ö', 'Ö', 'ş', 'Ş', 'ü', 'Ü'); $replace = array('c', 'C', 'g', 'G', 'i', 'I', 'o', 'O', 's', 'S', 'u', 'U'); $outputText=str_replace($search, $replace, $inputText); return $outputText; } $string = TurkishFix($var); echo mb_strtolower($string); Check here : https://3v4l.org/sYr8m