#1379416: encode charset name to ascii to avoid unicode promotion of output
diff --git a/Lib/email/charset.py b/Lib/email/charset.py
index ad56c58..dddaa76 100644
--- a/Lib/email/charset.py
+++ b/Lib/email/charset.py
@@ -209,7 +209,7 @@
                 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: