[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2014-11-05 Thread Thomas Neidhart (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Neidhart updated CODEC-121:
--
Attachment: CODEC-121_v2.patch

I have revisited my original patch and created a new one that should be 
backwards compatible:

 * add a new strict mode parameter to the codec: if strict=true implement the 
full ruleset of the quoted-printable spec
 * decode can handle softline breaks regardless of the strict parameter, this 
should be backwards compatible, previously an input with soft line breaks 
resulting in an exception

Would be nice to still include it in 1.10.

 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5, 1.6
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
 Fix For: 2.0

 Attachments: CODEC-121_postponed.patch, CODEC-121_v2.patch


 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2014-11-05 Thread Gary Gregory (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory updated CODEC-121:
---
Fix Version/s: (was: 2.0)
   1.10

 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5, 1.6
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
 Fix For: 1.10

 Attachments: CODEC-121_postponed.patch, CODEC-121_v2.patch


 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2012-03-19 Thread Thomas Neidhart (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Neidhart updated CODEC-121:
--

Fix Version/s: (was: 1.7)
   2.0

 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5, 1.6
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
 Fix For: 2.0

 Attachments: CODEC-121.patch, CODEC-121_v2.patch


 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  

--
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




[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2012-03-19 Thread Thomas Neidhart (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Neidhart updated CODEC-121:
--

Attachment: CODEC-121_postponed.patch

Attached the reverted changes for later inclusion.

 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5, 1.6
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
 Fix For: 2.0

 Attachments: CODEC-121_postponed.patch


 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  

--
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




[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2012-03-09 Thread Gary D. Gregory (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory updated CODEC-121:
--

Fix Version/s: (was: 1.6.1)
   1.7

 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5, 1.6
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
 Fix For: 1.7

 Attachments: CODEC-121.patch, CODEC-121_v2.patch


 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  

--
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




[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2012-03-07 Thread Gary D. Gregory (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory updated CODEC-121:
--

Affects Version/s: 1.6
Fix Version/s: (was: 1.x)
   1.6.1

 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5, 1.6
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
 Fix For: 1.6.1

 Attachments: CODEC-121.patch, CODEC-121_v2.patch


 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  

--
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




[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2012-03-06 Thread Thomas Neidhart (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Neidhart updated CODEC-121:
--

Attachment: CODEC-121_v2.patch

Hi Gary,

I have updated the patch, it now gets 100% test coverage.

Additionally, I have added a missing case of not encoded whitespace before a 
soft break and moved some repeated code into dedicated private methods to make 
the code more readable.

 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
 Fix For: 1.x

 Attachments: CODEC-121.patch, CODEC-121_v2.patch


 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  

--
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




[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2012-03-04 Thread Thomas Neidhart (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Neidhart updated CODEC-121:
--

Attachment: CODEC-121.patch

Hi,

I worked on this issue and came up with a patch to fully support the 
quoted-printable spec.

There are some simplifications to keep the code still simple and small:

 * do not split on words like in the wikipedia example, but rather at a fixed 
position
 * break at position 73 rather than filling up to pos 76 if possible
 * treat last two octets separately to simplify the rule that '=' must not be 
the ultimate or penultimate character

 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
 Fix For: 1.x

 Attachments: CODEC-121.patch


 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  

--
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




[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2011-12-20 Thread Gary D. Gregory (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory updated CODEC-121:
--

Fix Version/s: (was: 1.6)
   1.x

 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
 Fix For: 1.x


 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  

--
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




[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2011-11-10 Thread Henri Yandell (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henri Yandell updated CODEC-121:


 Fix Version/s: 1.6
Remaining Estimate: (was: 2h)
 Original Estimate: (was: 2h)

Assigning to 1.6, but going to depend on whether anyone wants to sit and code a 
solution.

 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
 Fix For: 1.6


 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  

--
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




[jira] [Updated] (CODEC-121) QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia

2011-04-21 Thread Java John (JIRA)

 [ 
https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Java John updated CODEC-121:


Description: 
Writing a unit test I discovered that the example Wikipedia uses for 
quoted-printable data does not decode but instead throws an exception.  
Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example

test:

  String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n +
mathematics is the most beautiful branch of philosophy.;

  String expected = If you believe that truth=beauty, then surely  +
mathematics is the most beautiful branch of philosophy.;

  assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );

I suppose I could fix if you like but currently I'm not a registered developer. 
 




  was:
Writing a unit test I discovered that the example Wikipedia uses for 
quoted-printable data does not decode but instead throws an exception.  
There example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example

test:

  String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n +
mathematics is the most beautiful branch of philosophy.;

  String expected = If you believe that truth=beauty, then surely  +
mathematics is the most beautiful branch of philosophy.;

  assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );

I suppose I could fix if you like but currently I'm not a registered developer. 
 





 QuotedPrintableCodec does not support soft line break per the 
 'quoted-printable' example on Wikipedia
 -

 Key: CODEC-121
 URL: https://issues.apache.org/jira/browse/CODEC-121
 Project: Commons Codec
  Issue Type: Bug
Affects Versions: 1.5
 Environment: I tested on Windows 7.
Reporter: Java John
  Labels: codec, decode, quoted-printable
   Original Estimate: 2h
  Remaining Estimate: 2h

 Writing a unit test I discovered that the example Wikipedia uses for 
 quoted-printable data does not decode but instead throws an exception.  
 Their example is here:  http://en.wikipedia.org/wiki/Quoted-printable#Example
 test:
   String qpdata   = If you believe that truth=3Dbeauty, then surely=20=\r\n 
 +
   mathematics is the most beautiful branch of philosophy.;
   String expected = If you believe that truth=beauty, then surely  +
   mathematics is the most beautiful branch of philosophy.;
   assertEquals( expected,  new QuotedPrintableCodec().decode(qpdata) );
 I suppose I could fix if you like but currently I'm not a registered 
 developer.  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira