[ https://issues.apache.org/jira/browse/MIME4J-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Markus Wiederkehr updated MIME4J-118: ------------------------------------- Attachment: mime4j-118-bytesequence-draft.patch Oleg, here is a draft of a patch to show what I mean. It is partly based on your code. Not all unit tests pass because with this approach the different writing modes no longer make sense. Notice how ByteSequenceUtil checks if a ByteSequence is actually a ByteArrayBuffer for performance optimization like you suggested. This patch does not include a lenient parsing mode. Please let me know if something like this is acceptable then I'll clean it up and add a few more details. > MIME stream parser handles non-ASCII fields incorrectly > ------------------------------------------------------- > > Key: MIME4J-118 > URL: https://issues.apache.org/jira/browse/MIME4J-118 > Project: JAMES Mime4j > Issue Type: Bug > Reporter: Oleg Kalnichevski > Assignee: Oleg Kalnichevski > Fix For: 0.6 > > Attachments: mime4j-118-bytesequence-draft.patch, > mime4j-118-field.patch, mimej4-118.patch > > > Presently MIME stream parser handles non-ASCII fields incorrectly. Binary > field content gets converted to its textual representation too early in the > parsing process using simple byte to char cast. The decision about > appropriate char encoding should be left up to individual ContentHandler > implementations. > Oleg -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.