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