cpython/Lib/email
R David Murray 7441a7aedd #14291: if a header has non-ascii unicode, default to CTE using utf-8
In Python2, if a unicode string was assigned as the value of a header,
email would automatically CTE encode it using the UTF8 charset.
This capability was lost in the Python3 translation, and this patch
restores it.

Patch by Ali Ikinci, assisted by R. David Murray.

I also added a fix for the mailbox test that was depending (with a comment
that it was a bad idea to so depend) on non-ASCII causing message_from_string
to raise an error.  It now uses support.patch to induce an error during
message serialization.
2012-03-14 02:59:51 -04:00
..
mime #11515: fix several typos. Patch by Piotr Kasprzyk. 2011-03-15 05:18:48 +02:00
test #14291: if a header has non-ascii unicode, default to CTE using utf-8 2012-03-14 02:59:51 -04:00
__init__.py fix import in email.message_from_binary_file() 2011-01-25 23:15:47 +00:00
_parseaddr.py Fix few typos. 2011-11-11 19:35:42 +01:00
base64mime.py Issue #4770: Restrict binascii module to accept only bytes (as specified). 2010-07-27 21:20:15 +00:00
charset.py #11554: reactivate test_email_codecs, and make it pass. 2011-03-15 12:20:02 -04:00
encoders.py Merge #9298 fix. 2011-03-16 16:13:07 -04:00
errors.py Copying the email package back, despite its failings. 2007-08-30 01:15:14 +00:00
feedparser.py #11605: don't use set/get_payload in feedparser; they do conversions. 2011-04-06 08:13:02 -04:00
generator.py Harmonize linesep docstrings, and fix the quoting of \r\n 2011-03-14 18:35:56 -04:00
header.py #14291: if a header has non-ascii unicode, default to CTE using utf-8 2012-03-14 02:59:51 -04:00
iterators.py Patch# 1258 by Christian Heimes: kill basestring. 2007-10-16 18:12:55 +00:00
message.py #11243: tests and fixes for handling of 'dirty data' in additional methods 2011-03-16 21:11:23 -04:00
parser.py Properly close a temporary TextIOWrapper in 'email'. 2010-10-29 23:08:13 +00:00
quoprimime.py Merge #11606: improved body_encode algorithm, no longer produces overlong lines 2011-03-24 12:27:23 -04:00
utils.py #8989: add 'domain' keyword to make_msgid. 2010-12-02 21:47:19 +00:00