python / cpython

The Python programming language
https://www.python.org
Other
62.47k stars 29.99k forks source link

email.header decode within word #44155

Closed 5915350c-1775-4045-87d2-6dfae2c7871d closed 17 years ago

5915350c-1775-4045-87d2-6dfae2c7871d commented 17 years ago
BPO 1582282
Nosy @warsaw

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = 'https://github.com/warsaw' closed_at = created_at = labels = ['library'] title = 'email.header decode within word' updated_at = user = 'https://bugs.python.org/tkikuchi' ``` bugs.python.org fields: ```python activity = actor = 'barry' assignee = 'barry' closed = True closed_date = None closer = None components = ['Library (Lib)'] creation = creator = 'tkikuchi' dependencies = [] files = [] hgrepos = [] issue_num = 1582282 keywords = [] message_count = 3.0 messages = ['30352', '30353', '30354'] nosy_count = 2.0 nosy_names = ['barry', 'tkikuchi'] pr_nums = [] priority = 'normal' resolution = 'fixed' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue1582282' versions = ['Python 2.5'] ```

5915350c-1775-4045-87d2-6dfae2c7871d commented 17 years ago

The problem is filed in mailman bug report: http://sourceforge.net/tracker/index.php?func=detail&aid=1578539&group_id=103&atid=100103

While Microsoft Entourage's way of encoding iso-8859-1 text is not compliant with RFC-2047, Python email.header.decode_header should treat this 'word' as a simple us-ascii string and should not parse into series of string/charset list.

Sm=?ISO-8859-1?B?9g==?=rg=?ISO-8859-1?B?5Q==?=sbord should be parsed as [('Sm=?ISO-8859-1?B?9rg==?=g=?ISO-8859-1?B?5Q==?=sbord', None)], not as [('Sm', None), ('\xf6', 'iso-8859-1'), ('g', None), ('\xe5', 'iso-8859-1'), ('sbord', None)]

warsaw commented 17 years ago

r54370 for Python 2.5 r54371 for Python 2.6

warsaw commented 17 years ago

Whoops! Resolution should have been "Fixed"