Reply to Re: iconv to strip out specfic language characters

Your name:

Reply:


Posted by kkadrese on 05/07/07 10:13

thank you,
I will stay now with
$str = iconv('ISO-8859-1', 'ASCII//IGNORE', $str);

Disappointingly that there is not such a function that would convert
language-specific characters to their ascii look-alikes. For me it
does not matter so much that it is not the same and more correct
representation would be specific for each language and so on so on...
I just need filenames to be used without problems and recognizable to
the author.

> > 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

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