[issue1467619] Header.decode_header eats up spaces

Ralf Schlatterbeck report at bugs.python.org
Mon Jan 2 16:50:44 CET 2012


Ralf Schlatterbeck <rsc at runtux.com> added the comment:

I've been bitten by this too (in python up to 2.7 in roundup the bug-tracker). We're currently using a workaround that re-inserts spaces, see git on roundup.sourceforge.net file mailgw.py method _decode_header_to_utf8

RFC2047 even has a test-case at the end, it specifies:

encoded form                                displayed as
(=?ISO-8859-1?Q?a?= b)                      (a b)

note the space between 'a' and 'b' above. Spaces between non-encoded and encoded parts should be preserved. And it's probably a good idea to put the examples from the RFC into the regression test.

----------
nosy: +runtux

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1467619>
_______________________________________


More information about the Python-bugs-list mailing list