diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-03-23 02:17:51 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-03-23 02:17:51 (GMT) |
commit | 8680bcc5db7c0edc09b09387c145932da34cd889 (patch) | |
tree | 5901ccac2b8e03dd7904d2a65eec65570160599c /Doc/library/email.mime.rst | |
parent | 192195a4fcf3aec27a43169df901667b21ea763a (diff) | |
download | cpython-8680bcc5db7c0edc09b09387c145932da34cd889.zip cpython-8680bcc5db7c0edc09b09387c145932da34cd889.tar.gz cpython-8680bcc5db7c0edc09b09387c145932da34cd889.tar.bz2 |
#14380: Have MIMEText defaults to utf-8 when passed non-ASCII unicode
Previously it would just accept the unicode, which would wind up as unicode in
the transfer-encoded message object, which is just wrong.
Patch by Jeff Knupp.
Diffstat (limited to 'Doc/library/email.mime.rst')
-rw-r--r-- | Doc/library/email.mime.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/email.mime.rst b/Doc/library/email.mime.rst index 9cd94d8..f3f34c8 100644 --- a/Doc/library/email.mime.rst +++ b/Doc/library/email.mime.rst @@ -175,7 +175,7 @@ Here are the classes: .. currentmodule:: email.mime.text -.. class:: MIMEText(_text, _subtype='plain', _charset='us-ascii') +.. class:: MIMEText(_text, _subtype='plain', _charset=None) Module: :mod:`email.mime.text` @@ -185,5 +185,5 @@ Here are the classes: minor type and defaults to :mimetype:`plain`. *_charset* is the character set of the text and is passed as a parameter to the :class:`~email.mime.nonmultipart.MIMENonMultipart` constructor; it defaults - to ``us-ascii``. No guessing or encoding is performed on the text data. - + to ``us-ascii`` if the string contains only ``ascii`` codepoints, and + ``utf-8`` otherwise. |