[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2018-05-15 Thread R. David Murray
R. David Murray added the comment: I should have just deleted the table, actually. The only important info in it is that per RFC '=', '=\n', and '= \n' all ought to become '='. But I don't think we should make that change, I think we should continue to turn those into ''. So I consider the

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Many thanks David! But sorry, your table confused me. I can't read it. Could you please reformat it? -- ___ Python tracker ___

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2018-05-14 Thread R. David Murray
R. David Murray added the comment: OK, I've finally gotten around to looking at this. It looks like quopri and binascii are not stripping trailing whitespace. quoprimime binascii quopri preferred b'=' '' b'' b'=' '=' b'= '

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thus currently the table of discrepancies looks as: quoprimime binascii quopri b'=' '' b'' b'=' b'= ' '' b'= ' b'= ' b'= \n' '' b'= \n' b'' b'=\r''' b'' b'=\r' b'==41' '=

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2017-03-26 Thread Martin Panter
Martin Panter added the comment: The double equals "==" case for the “quopri” implementation in Python is now consistent with the others thanks to the fix in Issue 23681 (see also Issue 21511). According to Issue 20121, the quopri (Python) implementation only supports LF (\n) characters as li

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.3, Python 3.4 ___ Python tracker ___

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2015-01-17 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2013-09-14 Thread R. David Murray
R. David Murray added the comment: As I said, not exactly any of the above. I'll get back to this after I finish the new email code (which should happen before the end of the month). I need to take some time to look over the RFCs and real world examples and come up with the most appropriate r

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2013-09-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: So what scheme we will picked? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2013-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perl's MIME::QuotedPrint produces same result as pure Python quopri. konwert qp-8bit produces same result as binascii (except '==41' it decodes as '=A'). RFC 2045 says: """A reasonable approach by a robust implementation might be to inclu

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2013-06-09 Thread R. David Murray
R. David Murray added the comment: Most of the variations represent different invalid-input recovery choices. I believe binascii's decoding of b'= \n' is incorrect, as is its decoding of b'==41'. quopri's decoding of b'=\r' is arguably incorrect as well, given that python generally supports

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2013-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are other inconsistencies. email.quoprimime.decode(), binascii.a2b_qp() and pure Python (by default binascii used) quopri.decodestring() returns different results for following data: quoprimime binascii quopri b'=' '' b''

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2013-05-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: >>> import quopri, email.quoprimime >>> quopri.decodestring(b'==41') b'=41' >>> email.quoprimime.decode('==41') '=A' I don't see a rule about double '=' in RFC 1521-1522 or RFCs 2045-2047 and I think quopri is wrong. Other half of this bug (encoding '=' as