Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2129787 | 5.0u7 | Robert Mckenna | P2 | Resolved | Fixed | b01 |
JDK-2129786 | 1.4.2_11 | Robert Mckenna | P2 | Resolved | Fixed | b01 |
- 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
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
- backported by
-
JDK-2129786 decodeText() doesn't convert from iso-2022-jp to Unicode for some Japanese chars
-
- Resolved
-
-
JDK-2129787 decodeText() doesn't convert from iso-2022-jp to Unicode for some Japanese chars
-
- Resolved
-
- relates to
-
JDK-6173388 JavaMail 1.3.2 - Email message with japanese characters shown as garbage
-
- Resolved
-
-
JDK-6283649 RFE : Support for "sjis", "euc-jp" and "iso-2022-jp" format
-
- Closed
-
-
JDK-4426415 (cs) Charset naming scheme is insufficient
-
- Open
-