diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-04-12 14:26:06 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-04-12 14:26:06 (GMT) |
commit | 27ef93797c4e0bdb46c9c2873264f89840028a5e (patch) | |
tree | 0204617bd1ccd907d7f6ccd95061aef3de6229b2 /Lib | |
parent | d10b65eb687575966f28d1f5f82a3642568aa82a (diff) | |
download | cpython-27ef93797c4e0bdb46c9c2873264f89840028a5e.zip cpython-27ef93797c4e0bdb46c9c2873264f89840028a5e.tar.gz cpython-27ef93797c4e0bdb46c9c2873264f89840028a5e.tar.bz2 |
Issue #7472: ISO-2022 charsets now consistently use 7bit CTE.
Fixed a typo in the email.encoders module so that messages output using
an ISO-2022 character set will use a content-transfer-encoding of
7bit consistently. Previously if the input data had any eight bit
characters the output data would get marked as 8bit even though it
was actually 7bit.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/email/encoders.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/encoders.py b/Lib/email/encoders.py index 06016cd..c1a44aa 100644 --- a/Lib/email/encoders.py +++ b/Lib/email/encoders.py @@ -75,7 +75,7 @@ def encode_7or8bit(msg): # iso-2022-* is non-ASCII but still 7-bit charset = msg.get_charset() output_cset = charset and charset.output_charset - if output_cset and output_cset.lower().startswith('iso-2202-'): + if output_cset and output_cset.lower().startswith('iso-2022-'): msg['Content-Transfer-Encoding'] = '7bit' else: msg['Content-Transfer-Encoding'] = '8bit' |