issues@javamail.java.net

[Bug 5853] New: UnsupportedEncodingException for charset _iso-2022-jp$ESC when parsing eml file

From: <bugzilla-daemon_at_kenai.com>
Date: Thu, 21 Mar 2013 03:52:55 +0000

http://kenai.com/bugzilla/show_bug.cgi?id=5853

             Bug #: 5853
           Summary: UnsupportedEncodingException for charset
                    _iso-2022-jp$ESC when parsing eml file
    Classification: Unclassified
           Product: javamail
           Version: 1.4.7
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: generic
        AssignedTo: shannon_at_kenai.com
        ReportedBy: Brian_S_at_kenai.com
                CC: issues_at_javamail.kenai.com


When creating a MimeMessage object from an eml file, we are receiving an
UnsupportedEncoding Exception on the getContent function. Here is the stack
trace:

java.io.UnsupportedEncodingException: _iso-2022-jp$ESC
    at sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source)
    at java.io.InputStreamReader.<init>(Unknown Source)
    at com.sun.mail.handlers.text_plain.getContent(text_plain.java:107)
    at javax.activation.DataSourceDataContentHandler.getContent(Unknown Source)
    at javax.activation.DataHandler.getContent(Unknown Source)
    at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1420)

The Content-Type header within the file:

    Content-Type: text/plain; charset="_iso-2022-jp$ESC"

If we manually update the eml file and change the Content-Type header to:

    Content-Type: text/plain; charset="UTF-8"

the eml file get processes without any exceptions. Is there a known issue with
the _iso-2022-jp$ESC charset?

-- 
Configure bugmail: http://kenai.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.