[
https://issues.apache.org/jira/browse/MIME4J-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13638180#comment-13638180
]
Clément Denis edited comment on MIME4J-228 at 4/22/13 5:14 PM:
---------------------------------------------------------------
Here is the code used to read the message :
File file = new
File("pathtothemessage/quotedprintablewithoutencoding.mime";
Message message = null;
try {
DefaultMessageBuilder messageBuilder = new DefaultMessageBuilder();
message = messageBuilder.parseMessage(new FileInputStream(file));
Entity entity = ((Multipart)
message.getBody()).getBodyParts().get(0);
String text = IOUtils.toString(((TextBody)
entity.getBody()).getReader());
System.out.println("text = " + text);
} finally {
if (message != null)
message.dispose();
}
was (Author: clement.denis):
Here is the code used to read the message :
{code}
File file = new
File("pathtothemessage/quotedprintablewithoutencoding.mime";
Message message = null;
try {
DefaultMessageBuilder messageBuilder = new DefaultMessageBuilder();
message = messageBuilder.parseMessage(new FileInputStream(file));
Entity entity = ((Multipart)
message.getBody()).getBodyParts().get(0);
String text = IOUtils.toString(((TextBody)
entity.getBody()).getReader());
System.out.println("text = " + text);
} finally {
if (message != null)
message.dispose();
}
{code}
> Quoted-printable text part without encoding has broken characters
> -----------------------------------------------------------------
>
> Key: MIME4J-228
> URL: https://issues.apache.org/jira/browse/MIME4J-228
> Project: James Mime4j
> Issue Type: Bug
> Components: parser (core)
> Affects Versions: 0.7.2
> Environment: Windows 7 64bits
> Oracle Java 1.7.0_17
> Reporter: Clément Denis
> Attachments: quotedprintablewithoutencoding.mime
>
>
> The attached message is a multipart message with a single part in a quoted
> printable format, but no specific charcter encoding.
> When no content encoding specified in a body part, the DefaultMessageBuilder
> defaults to us-ascii. But the output of the QuotedPrintableInputStream used
> to decode the text is actually ISO_8859_1 (at least in my environment).
> Quoted printable text should not depend on the encoding of the text, so the
> text should be fine.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira