Question on conversion from UTF8 to Shift_JIS (or ISO-2022-JP)
- From: wing328hk@xxxxxxxxx
- Date: 19 Apr 2006 02:23:04 -0700
Hi,
Sorry this is a cross-post in Perl.Unicode.
I've some questions about converting Japanese from UTF8 to Shift_JIS
(or finally ISO_2022_JP) under Unix as follows:
UTF8 ==> Shift_JIS ==> ISO-2022-JP
The first conversion from UTF8 to Shift_JIS is done using Text::Iconv.
The second conversion from Shift_JIS to ISO-2022-JP is done using
mathematic algorithm.
However, I found that some Japanese characters are corrupted during the
first conversion (UTF8 ==> Shift_JIS). For example, the Japanese
character (or symbol) ~ can be found in Shift_JIS but it was
converted to ? after the first conversion.
Does any one know a perfect (or better) way to convert from UTF8 to
Shift_JIS (or ISO-2022-JP)?
I know that ISO-2022-JP is a subset of Unicode but I couldn't find a
perfect way to convert from UTF8 to ISO-2022-JP and that's why others
suggest me to first convert from UTF8 to Shift_JIS and then from
Shift_JIS to ISO_2022_JP mathematically. Your comment is highly
aprpeciated.
Thanks,
Wing
.
- Follow-Ups:
- Re: Question on conversion from UTF8 to Shift_JIS (or ISO-2022-JP)
- From: Peter J. Holzer
- Re: Question on conversion from UTF8 to Shift_JIS (or ISO-2022-JP)
- Prev by Date: Re: hash value initializarion to zero ...
- Next by Date: Re: FAQ 4.44 How do I test whether two arrays or hashes are equal?
- Previous by thread: FAQ 4.45 How do I find the first array element for which a condition is true?
- Next by thread: Re: Question on conversion from UTF8 to Shift_JIS (or ISO-2022-JP)
- Index(es):
Relevant Pages
|