james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Lee (Created) (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] [Created] (MIME4J-209) Problem decoding quoted-printable question mark in subject
Date Thu, 01 Dec 2011 22:00:40 GMT
Problem decoding quoted-printable question mark in subject
----------------------------------------------------------

                 Key: MIME4J-209
                 URL: https://issues.apache.org/jira/browse/MIME4J-209
             Project: JAMES Mime4j
          Issue Type: Bug
    Affects Versions: 0.7.1
         Environment: Windows XP 64-bit, JDK 1.6.0 update 25, IntelliJ IDEA 10.5.2
            Reporter: Robert Lee


When a subject contains only "Subject: =?ISO-8859-1?Q???=" MIME4j doesn't decode it. It simply
returns "=?ISO-8859-1?Q???=". The encoding is however legal with regards to RFC2045:

6.7  2)   (Literal representation) Octets with decimal values of
          33 through 60 inclusive, and 62 through 126, inclusive,
          MAY be represented as the US-ASCII characters which
          correspond to those octets (EXCLAMATION POINT through
          LESS THAN, and GREATER THAN through TILDE,
          respectively).



Example message:

From: John Doe <example@example.com>
MIME-Version: 1.0
Content-Type: multipart/mixed;
        boundary="XXXXboundary text"
Subject: =?ISO-8859-1?Q???=

This is a multipart message in MIME format.

--XXXXboundary text
Content-Type: text/plain

this is the body text

--XXXXboundary text
Content-Type: text/plain;
Content-Disposition: attachment;
        filename="test.txt"

this is the attachment text

--XXXXboundary text--



Example code fragment:

MessageBuilder builder = new DefaultMessageBuilder();
Message message = builder.parseMessage(in);
System.out.println("Subject: " + message.getSubject());



This outputs "Subject: =?ISO-8859-1?Q???=" but should output "Subject: ?".

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message