Home | History | Annotate | Download | only in email

Lines Matching defs:Charset

6     'Charset',
27 # In "=?charset?q?hello_world?=", the =?, ?q?, and ?= add up to 7
111 def add_charset(charset, header_enc=None, body_enc=None, output_charset=None):
114 charset is the input character set, and must be the canonical name of a
117 Optional header_enc and body_enc is either Charset.QP for
118 quoted-printable, Charset.BASE64 for base64 encoding, Charset.SHORTEST for
121 message bodies in the input charset are to be encoded. Default is no
125 in. Conversions will proceed from input charset, to Unicode, to the
126 output charset when the method Charset.convert() is called. The default
130 the module's charset-to-codec mapping; use add_codec(charset, codecname)
136 CHARSETS[charset] = (header_enc, body_enc, output_charset)
148 def add_codec(charset, codecname):
149 """Add a codec that map characters in the given charset to/from Unicode.
151 charset is the canonical name of a character set. codecname is the name
155 CODEC_MAP[charset] = codecname
160 class Charset:
181 Charset.QP (for quoted-printable), Charset.BASE64 (for
182 base64 encoding), or Charset.SHORTEST for the shortest of
187 header encoding. Charset.SHORTEST is not allowed for
193 charset output will be converted to. Otherwise, it will
208 # charset is ASCII, as the standard (RFC XXX) requires.
217 # Set the input charset after filtering through the aliases and/or codecs
355 charset to the output charset automatically. This is not useful for
386 the input charset to output charset automatically. Unlike