R. David Murray <rdmur...@bitdance.com> added the comment:

Right, and the python email package fully supports non ascii:

>>> msg = EmailMessage()
>>> msg['Subject'] = "Panamá- Casco Antiguo"
>>> bytes(msg)
b'Subject: =?utf-8?q?Panam=C3=A1-?= Casco Antiguo\n\n'
>>> str(msg)
'Subject: Panamá- Casco Antiguo\n\n'
>>> msg['subject']
'Panamá- Casco Antiguo'

make_header also supports non-ascii, you just have to tell it what charset you 
want to use.  Like I said, make_header is part of the *legacy* API, and it 
really is a pain to use.  That's why we wrote the new API.

----------

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

Reply via email to