cpython/Lib/email
R David Murray e2922835b0 Merge #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 03:03:27 -04:00
..
mime #11515: fix several typos. Patch by Piotr Kasprzyk. 2011-03-15 05:18:48 +02:00
__init__.py fix import in email.message_from_binary_file() 2011-01-25 23:15:47 +00:00
_parseaddr.py Merge 3.2, fix typos. 2011-11-11 19:39:25 +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 #1874: detect invalid multipart CTE and report it as a defect. 2011-06-22 13:47:53 -04:00
feedparser.py #1874: detect invalid multipart CTE and report it as a defect. 2011-06-22 13:47:53 -04:00
generator.py #11731: simplify/enhance parser/generator API by introducing policy objects. 2011-04-18 13:59:37 -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
message.py #11243: tests and fixes for handling of 'dirty data' in additional methods 2011-03-16 21:11:23 -04:00
parser.py #11731: simplify/enhance parser/generator API by introducing policy objects. 2011-04-18 13:59:37 -04:00
policy.py #11731: simplify/enhance parser/generator API by introducing policy objects. 2011-04-18 13:59:37 -04:00
quoprimime.py Merge #11606: improved body_encode algorithm, no longer produces overlong lines 2011-03-24 12:27:23 -04:00
utils.py #665194: support roundtripping RFC2822 date stamps in the email.utils module 2011-07-20 11:41:21 -04:00