Martin Panter added the comment: Three slightly different points here:
1. Decoding trailing whitespace: My understanding is quoted-printable encoding aims to be tolerant of whitespace being added to and removed from the end of encoded lines. So I assume the “binascii” module is wrong to leave trailing whitespace in the decoded output, and the native “quopri” implementation is correct to ignore it. 2. CRLF handling: See Issue 20121. It seems CRLF newlines should be valid, and I have added a patch to that issue to make the native Python implementation handle CRLF newlines. 3. Whitespace encoding: The quopri-codec actually sets quotetabs=True. Here is a patch to document and test that, as well as correct the functions used by other codecs. ---------- assignee: -> docs@python components: +Documentation nosy: +docs@python, vadmium title: quopri module minor difference in decoding quoted-printable text -> quopri module differences in quoted-printable text with whitespace Added file: http://bugs.python.org/file37772/codec-impl.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16473> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com