[New-bugs-announce] [issue30033] email module base64-encodes utf-8 text

Jon Ribbens report at bugs.python.org
Mon Apr 10 13:45:40 EDT 2017


New submission from Jon Ribbens:

The email module, when creating text parts using character encoding utf-8, base64-encodes the output even though this is often inappropriate (e.g. if it is a Western language it is almost never appropriate).

>>> from email.mime.text import MIMEText
>>> m = MIMEText("hello", _charset="utf-8")
>>> m.as_string()
'Content-Type: text/plain; charset="utf-8"\nMIME-Version: 1.0\nContent-Transfer-Encoding: base64\n\naGVsbG8=\n'

----------
components: Library (Lib)
messages: 291435
nosy: jribbens
priority: normal
severity: normal
status: open
title: email module base64-encodes utf-8 text
type: behavior
versions: Python 2.7, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30033>
_______________________________________


More information about the New-bugs-announce mailing list