Home
last modified time | relevance | path

Searched refs:input_charset (Results 1 – 10 of 10) sorted by relevance

/external/python/cpython2/Lib/email/
Dcharset.py200 def __init__(self, input_charset=DEFAULT_CHARSET): argument
206 if isinstance(input_charset, unicode):
207 input_charset.encode('ascii')
209 input_charset = unicode(input_charset, 'ascii')
211 raise errors.CharsetError(input_charset)
212 input_charset = input_charset.lower().encode('ascii')
214 if not (input_charset in ALIASES or input_charset in CHARSETS):
216 input_charset = codecs.lookup(input_charset).name
219 self.input_charset = ALIASES.get(input_charset, input_charset)
223 henc, benc, conv = CHARSETS.get(self.input_charset,
[all …]
/external/python/cpython3/Lib/email/
Dcharset.py211 def __init__(self, input_charset=DEFAULT_CHARSET): argument
217 if isinstance(input_charset, str):
218 input_charset.encode('ascii')
220 input_charset = str(input_charset, 'ascii')
222 raise errors.CharsetError(input_charset)
223 input_charset = input_charset.lower()
225 self.input_charset = ALIASES.get(input_charset, input_charset)
229 henc, benc, conv = CHARSETS.get(self.input_charset,
232 conv = self.input_charset
239 self.input_codec = CODEC_MAP.get(self.input_charset,
[all …]
Dheader.py291 input_charset = charset.input_codec or 'us-ascii'
292 if input_charset == _charset.UNKNOWN8BIT:
295 s = s.decode(input_charset, errors)
/external/python/cpython3/Doc/library/
Demail.charset.rst25 .. class:: Charset(input_charset=DEFAULT_CHARSET)
39 Optional *input_charset* is as described below; it is always coerced to lower
43 *input_charset* is ``iso-8859-1``, then headers and bodies will be encoded using
45 *input_charset* is ``euc-jp``, then headers will be encoded with base64, bodies
51 .. attribute:: input_charset
77 headers or bodies. If the *input_charset* is one of them, this attribute
84 The name of the Python codec used to convert the *input_charset* to
124 with the *input_charset*.
151 it is *input_charset*.
185 Returns *input_charset* as a string coerced to lower
[all …]
Demail.compat32-message.rst256 *charset.input_charset* and *charset.output_charset* differ, the payload
/external/python/cpython2/Doc/library/
Demail.charset.rst19 .. class:: Charset([input_charset])
33 Optional *input_charset* is as described below; it is always coerced to lower
37 *input_charset* is ``iso-8859-1``, then headers and bodies will be encoded using
39 *input_charset* is ``euc-jp``, then headers will be encoded with base64, bodies
46 .. attribute:: input_charset
72 or bodies. If the *input_charset* is one of them, this attribute will
79 The name of the Python codec used to convert the *input_charset* to
122 with the *input_charset*.
149 it is *input_charset*.
191 Returns *input_charset* as a string coerced to lower
[all …]
Demail.message.rst144 *charset.input_charset* and *charset.output_charset* differ, the payload
154 payload either in unicode or encoded with *charset.input_charset*.
/external/python/cpython2/Lib/email/test/
Dtest_email.py97 eq(msg.get_charset().input_charset, 'iso-8859-1')
116 eq(msg.get_charset().input_charset, 'us-ascii')
123 self.assertEqual(msg.get_charset().input_charset, 'iso-8859-1')
1092 eq(msg.get_charset().input_charset, 'us-ascii')
1098 eq(msg.get_charset().input_charset, 'us-ascii')
Dtest_email_renamed.py92 eq(msg.get_charset().input_charset, 'iso-8859-1')
111 eq(msg.get_charset().input_charset, 'us-ascii')
118 self.assertEqual(msg.get_charset().input_charset, 'iso-8859-1')
1052 eq(msg.get_charset().input_charset, 'us-ascii')
/external/python/cpython3/Lib/test/test_email/
Dtest_email.py71 eq(msg.get_charset().input_charset, 'iso-8859-1')
90 eq(msg.get_charset().input_charset, 'us-ascii')
97 self.assertEqual(msg.get_charset().input_charset, 'iso-8859-1')
1663 eq(msg.get_charset().input_charset, 'us-ascii')
1669 eq(msg.get_charset().input_charset, 'utf-8')
1676 eq(msg.get_charset().input_charset, 'us-ascii')