Working with Accented Characters

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
127.0.0.1
Forum Newbie
Posts: 22
Joined: Mon Sep 12, 2005 8:59 pm

Working with Accented Characters

Post 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?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post 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
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply