diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-12-27 19:17:17 +0000 |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-12-27 19:17:17 +0000 |
commit | 5360d003b666f874a05dd532ecf511cd459117f8 (patch) | |
tree | 69e97598af1065dc4ed850d103e67e6bc2b6872d /Lib/email/charset.py | |
parent | 49ee82c4eb18003a198a6fc02f2bbbcb5d931180 (diff) | |
download | cpython-git-5360d003b666f874a05dd532ecf511cd459117f8.tar.gz |
#1379416: encode charset name to ascii to avoid unicode promotion of output
Diffstat (limited to 'Lib/email/charset.py')
-rw-r--r-- | Lib/email/charset.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/charset.py b/Lib/email/charset.py index ad56c58f80..dddaa76c55 100644 --- a/Lib/email/charset.py +++ b/Lib/email/charset.py @@ -209,7 +209,7 @@ class Charset: input_charset = unicode(input_charset, 'ascii') except UnicodeError: raise errors.CharsetError(input_charset) - input_charset = input_charset.lower() + input_charset = input_charset.lower().encode('ascii') # Set the input charset after filtering through the aliases and/or codecs if not (input_charset in ALIASES or input_charset in CHARSETS): try: |