Relates :
|
|
Relates :
|
|
Relates :
|
- Email message with japanese characters shown as garbage) where the bottom issue is the same as our issue; also creating our issue in the site to hopefully higher the priority of this issue at Sun. here is our code: 1 subject = msg.getHeader("Subject", null); 2 if (subject != null) { 3 try { 4 subject = MimeUtility.decodeText(subject); 5 } catch (UnsupportedEncodingException ioEx) { here is how we get string from email subject and decode it. - from outlook 2000, send out and email that has subject of : abc?@?W??def to our browser based application and outlook2000. - after the line 1, we get an encoded string like: String subject= "=?iso-2022-jp?B?YWJjGyRCLSEtOC1qGyhCZGVm?=" and this MIME Base64 encoded chars using iso-2022-jp seems to be fine. - after decodeText() in line 4, we get: String subject= "abc���def" where we expect: abc?@?W??def - here is the source of the email received by outlook 2000: Subject: =?iso-2022-jp?B?YWJjGyRCLSEtOC1qGyhCZGVm?= and outlook 2000 can decode it and display "abc?@?W??def" correctly by looking at the email received. (this confirms that the encoded form of "=?iso-2022-jp?B?YWJjGyRCLSEtOC1qGyhCZGVm?=" has been encoded correctly.) Thus, decodeText() seems to have garbled the characters of ?@?W?? (Maru1, RomanNumber4, Kabushiki-gaisha) when it converts from iso-2022-jp to Unicode. we have also confirmed that regular Japanese characters are converted correctly. found a similar issue in https://javapartner.sun.com/partner/bugs/data/bugs/6173388.html (6173388 JavaMail 1.3.2
|