![]() What am I doing wrong?įinally, I am debugging with IntelliJ 2020 on Windows 7 using the latest JDK 11. I am 99.99% sure I am using the decode/encode API incorrectly. The above code will correctly encode/decode the last two chars: 島 and 屋. This is a common character in Japanese text, e.g., Takashimaya dept store: 髙島屋. To be clear, I am absolutely sure the character here is Unicode character U+9AD9. Sample code to reproduce the issue: final String z = "髙" įinal Charset charset = Charset.forName("iso-2022-jp") įinal byte byteArr = z.getBytes(charset) įinal String z2 = new String(byteArr, charset) I found a strange scenario where I am unable to decode a single Japanese kanji character using character set iso-2022-jp. Some have HTML bodies encoded using character set iso-2022-jp. I am processing client emails written in Japanese.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |