note 124800 added to function.mb-convert-case

From: Date: Thu, 05 Mar 2020 20:29:38 +0000
Subject: note 124800 added to function.mb-convert-case
Groups: php.notes 
Request: Send a blank email to php-notes+get-214295@lists.php.net to get a copy of this message
You can use this function to fix problems related to Turkish "ı", "I", "i", "İ" characters. This function also replaces the weird "i̇" character with regular "i" character ("i̇ => i"). function mb_convert_case_tr($str, $type, $encoding = "UTF-8") { switch ($type) { case "u": case "upper": case MB_CASE_UPPER: $type = MB_CASE_UPPER; break; case "l": case "lower": case MB_CASE_LOWER: $type = MB_CASE_LOWER; break; case "t": case "title": case MB_CASE_TITLE: $type = MB_CASE_TITLE; break; } $str = str_replace("i", "İ", $str); $str = str_replace("I", "ı", $str); $str = mb_convert_case($str, $type, $encoding); $str = str_replace("i̇", "i", $str); return $str; } ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.195 (proxied: 176.41.34.95) ---- Manual Page -- http://php.net/manual/en/function.mb-convert-case.php Edit -- https://master.php.net/note/edit/124800 Del: integrated -- https://master.php.net/note/delete/124800/integrated Del: useless -- https://master.php.net/note/delete/124800/useless Del: bad code -- https://master.php.net/note/delete/124800/bad+code Del: spam -- https://master.php.net/note/delete/124800/spam Del: non-english -- https://master.php.net/note/delete/124800/non-english Del: in docs -- https://master.php.net/note/delete/124800/in+docs Del: other reasons-- https://master.php.net/note/delete/124800 Reject -- https://master.php.net/note/reject/124800 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#214295) next »