Reply to Re: iconv to strip out specfic language characters

Your name:

Reply:


Posted by J.O. Aho on 04/24/07 16:23

kkadrese@yahoo.com wrote:
> hello group,
>
> I cannot figure out how to use iconv to "normalize" characters
> specific to some language. I need it in file upload where I take a
> file from local disc and then save to server and use in web pages, for
> example, as img source.
>
> What should be the second parameter of the function?
>
> Say,
> iconv('ISO-8859-1', 'ASCII//TRANSLIT', $str);
> works but it gives too much transformed result.
>
> I would like just replace specific chars, like "a acute", "a with
> macron", "a umlaut", with a character without accent.

If there aren't a character that is the same in the two character setups, you
loose the characters, aring isn't the same as a, even if they may look like
the same and it's why it won't be represented in an ASCII character setup.

If you want to replace a character with a completely different one, then you
need to use ereg_replace or similar functions.

It's always a bad idea to convert a string to a less representative character
setup and ASCII is the bottom.

--

//Aho

[Back to original 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

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