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

  1. PyObject* PyUnicode_EncodeUTF32(const Py_UNICODE* data, Py_ssize_t length, const(char)* errors, int byteorder)
    version(Python_2_6_Or_Later)
    PyUnicode_EncodeUTF32
    ()
  2. alias PyUnicode_EncodeUTF32 = PyUnicodeUCS2_EncodeUTF32
  3. alias PyUnicode_EncodeUTF32 = PyUnicodeUCS4_EncodeUTF32

Parameters

data
Type: Py_UNICODE*

Unicode char buffer

length

number of Py_UNICODE chars to encode

errors
Type: const(char)*

error handling

byteorder
Type: int

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

*/ /// Availability: >= 2.

Meta