PyUnicodeUCS2_DecodeUTF16

Decodes length bytes from a UTF-16 encoded buffer string and returns the corresponding Unicode object.

errors (if non-NULL) defines the error handling. It defaults to "strict".

If byteorder is non-NULL, the decoder starts decoding using the given byte order:

*byteorder == -1: little endian *byteorder == 0: native order *byteorder == 1: big endian

In native mode, the first two bytes of the stream are checked for a BOM mark. If found, the BOM mark is analysed, the byte order adjusted and the BOM skipped. In the other modes, no BOM mark interpretation is done. After completion, *byteorder is set to the current byte order at the end of input data.

If byteorder is NULL, the codec starts in native order mode.

  1. PyObject* PyUnicodeUCS2_DecodeUTF16(const(char)* string, Py_ssize_t length, const(char)* errors, int* byteorder)
    version(Python_Unicode_UCS2)
    PyUnicodeUCS2_DecodeUTF16
    (
    const(char)* string
    ,,
    const(char)* errors
    ,
    )
  2. alias PyUnicode_DecodeUTF16 = PyUnicodeUCS2_DecodeUTF16

Meta