You are here: Re: [PHP] Re: Removing nonlatin characters « PHP « IT news, forums, messages
Re: [PHP] Re: Removing nonlatin characters

Posted by Rene Brehmer on 09/28/10 11:20

Documented research indicate that on Fri, 1 Jul 2005 13:58:23 +0300, Dotan
Cohen wrote:

> On 6/29/05, Rene Brehmer <plasticbunny@metalbunny.net> wrote:
> I think you mean something like this:
>
> function stripAccents($string) {
> $returnString = strtr($string,
> 'àáâãäçèéêëìíîïñòóôõöšùúûüýÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖŠÙÚÛÜÝ',
> 'aaaaaceeeeiiiinooooosuuuuyAAAAACEEEEIIIINOOOOOSUUUUY');
> $returnString =
> str_replace('æ','ae',str_replace('Æ','AE',$returnString));
> $returnString =
> str_replace('ø','oe',str_replace('Ø','OE',$returnString));
> $returnString = str_replace('ß','ss',$returnString);
> return $returnString;
> }
>
> This function is part using code once posted on this list, part my own
> creation.
>
>Thank you Rene. Does this approach have any special advantages over
>recode_string?

Totally forgot ... there is one advantage that you can control what the
characters are replaced with ... but I dunno if recode_string does as good
a job ...

--
Rene Brehmer
aka Metalbunny

We have nothing to fear from free speech and free information on the
Internet, but pop-up advertising!

http://metalbunny.net/
My little mess of things...

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация