users@glassfish.java.net

JavaMail QPEncoderStream =0D and =0A bug (not newlines)

From: <glassfish_at_javadesktop.org>
Date: Tue, 09 Dec 2008 10:11:06 PST

My Company has been having encoding issues with Quoted Printable encoding in javamail and found that carriage returns and newlines where not being encoded correctly. We found the bug in QPEncoderStream.java and have fixed it, I do not know how to submit a patch to the GlassFish Project and so I will simply put the changed lines below:

line 123: if (c == '\r') {
line 124: gotCR = true;
line 125: } else {
line 126: if(gotCR && c != '\n'){
line 127: output('\r', true);
line 128: }
line 129: if (c == '\n' && gotCR) {

Hope this helps someone.


-Rory McGuire (Neonova Director)
www.neonova.co.za
[Message sent by forum member 'rmcguire' (rmcguire)]

http://forums.java.net/jive/thread.jspa?messageID=320846