Replacing accented chars using strtr, in UTF8
Posted: Tue Apr 25, 2006 12:28 pm
I am needing to "clean" strings of characters that include accents.
That is, I need to turn "élève" into "eleve".
In the past, I have used a function like this:
But the site I'm working on now is in UTF8. The above function is not working at all - it is replacing each accented letter by two characters, where one of them is seemingly random.
Can anyone offer any help here??
thanks!!
That is, I need to turn "élève" into "eleve".
In the past, I have used a function like this:
Code: Select all
$clean_string = strtr($accented_string, "éè", "ee");Can anyone offer any help here??
thanks!!