[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnu-libiconv] TILDE in Shift-jis
From: |
Bruno Haible |
Subject: |
Re: [bug-gnu-libiconv] TILDE in Shift-jis |
Date: |
Tue, 20 May 2008 01:01:26 +0200 |
User-agent: |
KMail/1.5.4 |
Hi,
Takemoto wrote:
> char(240) from utf-8 to EUC-JP
> http://bugs.php.net/bug.php?id=38425
Character 0xA0 is invalid in EUC-JP.
//TRANSLIT and //IGNORE don't handle this. They both apply to the target
character set, not to the source character set. See the documentation:
When the string "//TRANSLIT" is appended to tocode,
transliteration is activated. This means that when a char-
acter cannot be represented in the target character set,
it can be approximated through one or several characters
that look similar to the original character.
When the string "//IGNORE" is appended to tocode, charac-
ters that cannot be represented in the target character
set will be silently discarded.
For this reason, UTF-8//TRANSLIT and UTF-8//IGNORE are the same as UTF-8.
When your input file is invalid, really you should fix the input, instead
of expecting iconv to fix it up somehow.
Bruno