Lines Matching defs:charset
102 [^?]* # charset
220 charset = None
662 charset = 'us-ascii'
746 charset = first_param.charset
783 value = value.decode(charset, 'surrogateescape')
787 # because otherwise unknown charset is a silent
1039 """ encoded-word = "=?" charset "?" encoding "?" encoded-text "?="
1064 text, charset, lang, defects = _ew.decode('=?' + tok + '?=')
1068 ew.charset = charset
2504 # Assume the charset/lang is missing and the token is the value.
2506 "Missing required charset/lang delimiters"))
2517 param.charset = t.value
2786 charset = encoding
2790 charset = 'unknown-8bit'
2793 # 'charset' property on the policy.
2794 charset = 'utf-8'
2826 part.ew_combine_allowed, charset)
2865 def _fold_as_ew(to_encode, lines, maxlen, last_ew, ew_combine_allowed, charset):
2895 encode_as = 'utf-8' if charset == 'us-ascii' else charset
2898 # of the charset name.
2913 encoded_word = _ew.encode(to_encode_word, charset=encode_as)
2919 encoded_word = _ew.encode(to_encode_word, charset=encode_as)
2953 charset = encoding
2961 charset = 'unknown-8bit'
2964 charset = 'utf-8'
2968 tstr = "{}*={}''{}".format(name, charset, encoded_value)
2980 extra_chrome = charset + "''"