summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/email/encoders.py2
-rw-r--r--Misc/NEWS4
2 files changed, 5 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'
diff --git a/Misc/NEWS b/Misc/NEWS
index ed6bccb..c95076e 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -15,6 +15,10 @@ Core and Builtins
Library
-------
+- Issue #7472: Fixed typo in email.encoders module; messages using ISO-2022
+ character sets will now consistently use a Content-Transfer-Encoding of
+ 7bit rather than sometimes being marked as 8bit.
+
- Issue #8330: Fix expected output in test_gdb.
- Issue #8374: Update the internal alias table in the :mod:`locale` module