Issue 15570: email.header.decode_header parses differently (original) (raw)
Issue15570
Created on 2012-08-07 05:19 by ddvoinikov, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg167602 - (view) | Author: Dmitry Dvoinikov (ddvoinikov) | Date: 2012-08-07 05:19 |
The following script --- import email.header print(email.header.decode_header("foo =?windows-1251?Q?bar?=")) --- produces [(b'foo', None), (b'bar', 'windows-1251')] in Python 3.2 but [(b'foo ', None), (b'bar', 'windows-1251')] in Python 3.3.0b1 | ||
msg167619 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2012-08-07 12:36 |
This is an intentional change (see issue 1079). It is entirely possible that this bug fix should be reverted, however, because of backward compatibility concerns. I'm open to that argument, but I'd prefer to keep the fixed behavior, since the unfixed behavior causes us to violate the RFCs in several cases, as you can see from that and the related issues. Note also the availability in 3.3 of the provisional email policies that will do an automatic full decode-to-unicode of such headers. | ||
msg168921 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2012-08-23 02:12 |
Absent an argument in favor of reversion, I'm closing this. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:33 | admin | set | github: 59775 |
2012-08-23 02:12:17 | r.david.murray | set | status: open -> closedmessages: + stage: resolved |
2012-08-07 12:36:09 | r.david.murray | set | nosy: + barry, r.david.murraymessages: + components: + email, - Library (Lib) |
2012-08-07 05:19:23 | ddvoinikov | create |