Changeset 391 for python/trunk/Lib/email/charset.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/email/charset.py
r2 r391 10 10 ] 11 11 12 import codecs 12 13 import email.base64mime 13 14 import email.quoprimime … … 187 188 body_encoding. 188 189 189 output_charset: Some character sets must be converted before the can be190 output_charset: Some character sets must be converted before they can be 190 191 used in email headers or bodies. If the input_charset is 191 192 one of them, this attribute will contain the name of the … … 213 214 except UnicodeError: 214 215 raise errors.CharsetError(input_charset) 215 input_charset = input_charset.lower() 216 # Set the input charset after filtering through the aliases 216 input_charset = input_charset.lower().encode('ascii') 217 # Set the input charset after filtering through the aliases and/or codecs 218 if not (input_charset in ALIASES or input_charset in CHARSETS): 219 try: 220 input_charset = codecs.lookup(input_charset).name 221 except LookupError: 222 pass 217 223 self.input_charset = ALIASES.get(input_charset, input_charset) 218 224 # We can try to guess which encoding and conversion to use by the
Note:
See TracChangeset
for help on using the changeset viewer.