|
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
Navigation:
[Reply to this message]
|