[ https://issues.apache.org/jira/browse/MIME4J-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615183#action_12615183 ]
Stefano Bagnara commented on MIME4J-63: --------------------------------------- I had to change CodecUtil this way, maybe it helps you (or double check your work). ------------- private void escape(byte next) throws IOException { if (--nextSoftBreak <= QUOTED_PRINTABLE_OCTETS_PER_ESCAPE) { softBreak(); } >>> int nextUnsigned = next; >>> if (nextUnsigned < 0) nextUnsigned += 256; write(EQUALS); --nextSoftBreak; write(HEX_DIGITS[nextUnsigned >> 4]); --nextSoftBreak; write(HEX_DIGITS[nextUnsigned % 0x10]); } --------------------- (sorry this is not a diff, but I have too many changes in this file locally) > QuotedPrintable encoder fails on 8bit bytes > ------------------------------------------- > > Key: MIME4J-63 > URL: https://issues.apache.org/jira/browse/MIME4J-63 > Project: Mime4j > Issue Type: Bug > Affects Versions: 0.4 > Reporter: Stefano Bagnara > Fix For: 0.4 > > Attachments: qp-body.msg, qp-body_decoded.xml, qp-body_decoded_1.txt > > > CodecUtil - BinaryQuotedPrintableEncoder treat incoming char (casted to > bytes) as unsigned while they are signed. > Thus throwing OOBE on non 7bit content. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]