PyUnicodeUCS2_EncodeUTF32

Returns a Python string object holding the UTF-32 encoded value of the Unicode data.

If byteorder is not 0, output is written according to the following byte order:

byteorder == -1: little endian byteorder == 0: native byte order (writes a BOM mark) byteorder == 1: big endian

If byteorder is 0, the output string will always start with the Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark is prepended.

version(!Python_3_3_Or_Later && Python_Unicode_UCS2 && Python_2_6_Or_Later)
extern (C)
PyUnicodeUCS2_EncodeUTF32
(,,
const(char)* errors
,)

Parameters

data Py_UNICODE*

Unicode char buffer

length Py_ssize_t

number of Py_UNICODE chars to encode

errors const(char)*

error handling

byteorder int

byteorder to use 0=BOM+native;-1=LE,1=BE

Availability: >= 2.6

Meta