[issue8132] email.header.decode_header makes mistakes

2010-03-13 Thread R. David Murray
R. David Murray added the comment: Per the RFC, this is the correct behavior. An encoded word *must* begin and end either at the field boundary or with whitespace. So ...?=Arobase, with no whitespace between the = and Arobase, makes your first example into an invalid encoded word, and thus

[issue8132] email.header.decode_header makes mistakes

2010-03-13 Thread grumetz
New submission from grumetz : Examples: s = '=?UTF-8?B?QWNjdXPDqSBkZSByw6ljZXB0aW9uIChhZmZpY2jDqSkgLSA=?=Arobase !' decode_header(s) ---> [('=?UTF-8?B?QWNjdXPDqSBkZSByw6ljZXB0aW9uIChhZmZpY2jDqSkgLSA=?=Arobase !', None)] which seems bad... but ss ='=?UTF-8?B?QWNjdXPDqSBkZSByw6ljZXB0aW9uIChhZmZpY