Lines Matching refs:charset
28 # In "=?charset?q?hello_world?=", the =?, ?q?, and ?= add up to 7
112 def add_charset(charset, header_enc=None, body_enc=None, output_charset=None):
115 charset is the input character set, and must be the canonical name of a
122 message bodies in the input charset are to be encoded. Default is no
126 in. Conversions will proceed from input charset, to Unicode, to the
127 output charset when the method Charset.convert() is called. The default
131 the module's charset-to-codec mapping; use add_codec(charset, codecname)
137 CHARSETS[charset] = (header_enc, body_enc, output_charset)
149 def add_codec(charset, codecname):
150 """Add a codec that map characters in the given charset to/from Unicode.
152 charset is the canonical name of a character set. codecname is the name
156 CODEC_MAP[charset] = codecname
205 charset output will be converted to. Otherwise, it will
220 # charset is ASCII, as the standard (RFC XXX) requires.
229 # Set the input charset after filtering through the aliases
288 this charset's `header_encoding`.
324 encoder = partial(encoder_module.header_encode, charset=codec)
327 charset = self.get_output_charset()
328 extra = len(charset) + RFC2047_CHROME_LEN
346 length = encoder_module.header_length(_encode(this_line, charset))
385 output charset is a 7bit encoding, so re-encoding the decoded
400 # latin1 charset, which will encode any byte as a single code point