picop.cycodecs#
Codec registry helpers.
- picop.cycodecs.codec_backslashreplace_errors(exc)#
Backslash replace handler. :type exc:
object:param exc:- Return type:
- picop.cycodecs.codec_decode(o, encoding, errors)#
- picop.cycodecs.codec_decoder(encoding)#
Return the decoder for
encoding(PyCodec_Decoder).Notes
encodingmust bebytes, notstr.
- picop.cycodecs.codec_encode(o, encoding, errors)#
- picop.cycodecs.codec_encoder(encoding)#
Return the encoder for
encoding(PyCodec_Encoder).Notes
encodingmust bebytes, notstr.
- picop.cycodecs.codec_ignore_errors(exc)#
Ignore error handler (
PyCodec_IgnoreErrors). :type exc:object:param exc:- Return type:
- picop.cycodecs.codec_incremental_decoder(encoding, errors)#
Return an incremental decoder (
PyCodec_IncrementalDecoder).Notes
encoding/errorsmust bebyteswhen provided, notstr.
- picop.cycodecs.codec_incremental_encoder(encoding, errors)#
Return an incremental encoder (
PyCodec_IncrementalEncoder).Notes
encoding/errorsmust bebyteswhen provided, notstr.
- picop.cycodecs.codec_known(encoding)#
Return True if
encodingis a known codec (PyCodec_KnownEncoding).Notes
encodingmust bebytes, notstr. See Safety.
- picop.cycodecs.codec_lookup_error(name)#
Lookup a codec error callback (
PyCodec_LookupError).Notes
namemust bebytes, notstr.
- picop.cycodecs.codec_namereplace_errors(exc)#
Name replace handler. :type exc:
object:param exc:- Return type:
- picop.cycodecs.codec_register(search_function)#
Register a codec search function (
PyCodec_Register).Notes
Returns
0on success; errors raise — do not use the status as a bool.
- picop.cycodecs.codec_register_error(name, error)#
Register a codec error callback (
PyCodec_RegisterError).Notes
namemust bebytes. Returns0on success; errors raise — do not use the status as a bool.
- picop.cycodecs.codec_replace_errors(exc)#
Replace error handler (
PyCodec_ReplaceErrors). :type exc:object:param exc:- Return type:
- picop.cycodecs.codec_stream_reader(encoding, stream, errors)#
Return a stream reader (
PyCodec_StreamReader).Notes
encoding/errorsmust bebyteswhen provided, notstr.
- picop.cycodecs.codec_stream_writer(encoding, stream, errors)#
Return a stream writer (
PyCodec_StreamWriter).Notes
encoding/errorsmust bebyteswhen provided, notstr.