Possible Duplicate:
How do I detect non-ASCII characters in a string?
I have an array representing a US-ASCII transliteration table, liket this one:
http://www.geopostcodes.com/encoding#az
If the string has one of those characters, then I replace it with the ASCII correspondent (with strtr
).
Because the array is huge, I wish to load it into a variable and transliterate the string only if the string contains these type of UTF-8 characters.
Is there a decently fast way to find this out?