Berker Peksag added the comment:

> >>> email.header.decode_header("foo")
> [('foo', None)]

email.header.decode_header() implements rfc-2047 and the "foo" header doesn't 
match the syntax described in rfc-2047 (see "2. Syntax of encoded-words").

See the code for more information:

* http://hg.python.org/cpython/file/default/Lib/email/header.py#l34
* http://hg.python.org/cpython/file/default/Lib/email/header.py#l81

See the "6.1. Recognition of 'encoded-word's in message headers" section at 
http://www.rfc-base.org/txt/rfc-2047.txt

----------
components: +email
nosy: +barry, berker.peksag, r.david.murray

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21492>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to