我想在座右铭中摆脱与驻军的污名,我写了这一功能。 然而,在服务器中,它不承认这些信件。 任何建议?
function strtolower_tr($string)
{
$low=array("Ü" => "U","ü" => "u", "Ö" => "O","ö" => "o", "Ğ" => "G","ğ" => "g", "Ş" => "S","ş" => "s", "Ç" => "C","ç" => "c", "İ" => "I","i" => "i", "I" => "i","I" => "I");
return strtolower(strtr($string,$low));
}
------
$low=array("?~" => "u?", "?~V" => "o?", "?~^" => "g", "?~^" => "s", "?~G" => "c", "İ" => "i", "I" => i");
EDITED:
I found this: However, its not working for letter ı and I setlocale(LC_ALL, en_US.UTF8 ); function clearUTF($s) { $r = ; $s1 = @iconv( UTF-8 , ASCII//TRANSLIT , $s); $j = 0; for ($i = 0; $i < strlen($s1); $i++) { $ch1 = $s1[$i]; $ch2 = @mb_substr($s, $j++, 1, UTF-8 ); if (strstr( `^~ " , $ch1) !== false) { if ($ch1 <> $ch2) { --$j; continue; } } $r .= ($ch1== ? ) ? $ch2 : $ch1; } return $r; }