[issue13693] email.Header.Header incorrect/non-smart on international charset address fields
kxroberto
report at bugs.python.org
Sun Jan 1 19:57:08 CET 2012
kxroberto <kxroberto at users.sourceforge.net> added the comment:
now I tried to render this address field header
u'Name <abc\u03a3 at xy>, abc at ewf, "Nameß" <weofij at fjeio>'
with
h = email.Header.Header(continuation_ws='')
h.append ... / email.Header.make_header via these chunks:
[('Name <', us-ascii), ('abc\xce\xa3', utf-8), ('@xy>, abc at ewf, "', us-ascii), ('Name\xc3\x9f', utf-8), ('" <weofij at fjeio>', us-ascii)]
the outcome is:
'Name < =?utf-8?b?YWJjzqM=?= @xy>, abc at ewf, " =?utf-8?b?TmFtZcOf?=\n " <weofij at fjeio>'
(note: local part of email address can be utf too)
It seems to be impossible to avoid the erronous extra spaces from outside within that email.Header framework.
Thus I guess it was not possible up to now to decently format a beyond-ascii MIME message using the official email.Header mechanism? - even when pre-digesting things
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13693>
_______________________________________
More information about the Python-bugs-list
mailing list