Re: [PHP] Replacing accented characters by non-accented characters
[email protected] (tedd)
| Newsgroups | php.general |
|---|---|
| Message-ID | <p06240801c44e441d43d7@[192.168.1.101]> |
Yannick: Considering that we just had a flurry of pet-peeves on the list, I rant on one of mine. At 1:25 PM -0500 5/12/08, Yannick Warnier wrote: >I'm trying to give a universally-manageable directory name to an item >using a free-text title. I want to avoid every type of accentuated >character and everything outside of pure ASCII to make it the most >portable possible. >Generating a random hash is not acceptable as we want to be the most >user-friendly possible. <rant> As Rocky (the flying squirrel of Bullwinkle fame) once said when a gentleman in a black suit identified himself as "Military Intelligence" -- "That sounds like a contradiction in terms." To make something as user-friendly as possible is to accommodate as many users as possible, including those who's native language is not English -- like 96 percent of the world. You may want to call whatever you are doing as an "universally-manageable directory", but it can't be if it rules out the majority of the universe (as we know it). Why not embrace Unicode and not worry about it? I suggest you read "Building Scalable We Sites" by Henderson -- specifically chapter 4, which deals with Unicode, Internationalization and Localization. Looks to me like you're trying to fit a gross into a dozen -- that's a lossy process that's probably not going to do what you want. </rant> Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com