You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (JIRA)" <ji...@apache.org> on 2011/05/04 21:37:03 UTC
[jira] [Commented] (CODEC-121) QuotedPrintableCodec does not
support soft line break per the 'quoted-printable' example on Wikipedia
[ https://issues.apache.org/jira/browse/CODEC-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028913#comment-13028913 ]
Gary D. Gregory commented on CODEC-121:
---------------------------------------
Note that the class is documented as not implementing soft line breaks:
{quote}
Rules #3, #4, and #5 of the quoted-printable spec are not implemented yet because the complete quoted-printable spec does not lend itself well into the byte[] oriented codec framework. Complete the codec once the streamable codec framework is ready. The motivation behind providing the codec in a partial form is that it can already come in handy for those applications that do not require quoted-printable line formatting (rules #3, #4, #5), for instance Q codec.
{quote}
> 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