PyUnicode_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.

Meta