Page 1 of 1

Working with Accented Characters

Posted: Tue Sep 13, 2005 2:33 am
by 127.0.0.1
I have a few ideas how to accomplish this but I am posting to see what alternatives there are and which is fastest to code.

I have the strange problem on a little project I am working on with accented characters. For example bénédictions.

I am trying to find the simplest way to remove the accents leaving me with just a striped version of the word itself.

My first idea was to convert each character in the string to its ascii code then work some sort of conversion class which wouldn't be very difficult.

Any other ideas?

Posted: Tue Sep 13, 2005 2:41 am
by s.dot
hmm I thought I knew of it off hand, but there's a function that does just that.

I searched php.net and came up with http://us2.php.net/mb_convert_encoding or iconv