Replace diacritic characters with “equivalent” ASCII in PHP?
问题 Related questions: How to replace characters in a java String? How to replace special characters with their equivalent (such as " á " for " a") in C#? As in the questions above, I'm looking for a reliable, robust way to reduce any unicode character to near-equivalent ASCII using PHP. I really want to avoid rolling my own look up table. For example (stolen from 1st referenced question): Gračišće becomes Gracisce 回答1: The iconv module can do this, more specifically, the iconv() function: $str =