mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Merged revisions 79994 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79994 | r.david.murray | 2010-04-12 10:26:06 -0400 (Mon, 12 Apr 2010) | 9 lines 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. ........
This commit is contained in:
parent
46cd93a42f
commit
ef3d6bd25f
2 changed files with 5 additions and 1 deletions
|
@ -62,7 +62,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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue