[issue28122] email.header.decode_header can not decode string with quotation

2016-09-13 Thread R. David Murray
R. David Murray added the comment: Note, however, that python3 will compensate for this bug in the input, and register a defect for it: >>> import email >>> import email.policy >>> msg = email.message_from_string('To: "=?gb18030?B?bWFpbGZvcnRlc3R0?=" >>> <2070776...@qq.com>\n\ntest body',

[issue28122] email.header.decode_header can not decode string with quotation

2016-09-13 Thread era
era added the comment: The double quotes around the "human readable" part of the email address are not allowed. Python is handling this correctly. -- nosy: +era ___ Python tracker

[issue28122] email.header.decode_header can not decode string with quotation

2016-09-13 Thread sijian liang
New submission from sijian liang: #!/usr/bin/python #-*- coding:utf-8 -*- import email # from email.parser import Parser def decode_email_header(header, sep=''): l = [] for s, c in header: if c: l.append(s.decode(c)) else:

[issue28122] email.header.decode_header can not decode string with quotation

2016-09-13 Thread sijian liang
Changes by sijian liang : -- components: email files: demo.py nosy: barry, r.david.murray, sijian liang priority: normal severity: normal status: open title: email.header.decode_header can not decode string with quotation type: behavior versions: Python 2.7 Added