Home | History | Annotate | Download | only in email

Lines Matching refs:codec

97 # Map charsets to their Unicode codec strings.
129 Both input_charset and output_charset must have Unicode codec entries in
130 the module's charset-to-codec mapping; use add_codec(charset, codecname)
149 """Add a codec that map characters in the given charset to/from Unicode.
152 of a Python codec, as appropriate for the second argument to the unicode()
196 input_codec: The name of the Python codec used to convert the
197 input_charset to Unicode. If no conversion codec is
200 output_codec: The name of the Python codec used to convert Unicode
201 to the output_charset. If no conversion codec is necessary,
236 # guess and try a Unicode codec with the same name as input_codec.
299 # Input codec not installed on system, so return the original
306 Uses the proper codec to try and convert the string from Unicode back
317 codec = self.output_codec
319 codec = self.input_codec
320 if not isinstance(ustr, unicode) or codec is None:
323 return ustr.encode(codec, 'replace')
325 # Output codec not installed