Possible Duplicate:
PHP: Replace umlauts with closest 7-bit ASCII equivalent in an UTF-8 string
I want to replace diacritics characters with his non-diacritics brother. example: from "guľôčka" I wanna get "gulocka"
Is here some native function to do it?
I was looking for list of all worldwide diacritics characters for replace with str_replace. I can't find it.
Thanks a lot.
You can achieve this by using iconv, available in PHP, and requesting an encoding conversion with transliteration. (This actually works for many different scripts!) If you only want basic European characters, make the target Latin-1, or even ASCII.
From the manual page:
iconv("UTF-8", "ISO-8859-1//TRANSLIT", $text)
加载中,请稍侯......
精彩评论