Remove diacritics from a string
问题 Is it possible? This is my input string: ľ š č ť ž ý á í é Č Á Ž Ý This is the output I want: l s c t z y a i e C A Z Y 回答1: There is a function that Wordpress uses and works nice. Here's the working code with output. <?php function seems_utf8($str) { $length = strlen($str); for ($i=0; $i < $length; $i++) { $c = ord($str[$i]); if ($c < 0x80) $n = 0; # 0bbbbbbb elseif (($c & 0xE0) == 0xC0) $n=1; # 110bbbbb elseif (($c & 0xF0) == 0xE0) $n=2; # 1110bbbb elseif (($c & 0xF8) == 0xF0) $n=3; #