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(Py_UNICODE* data, Py_ssize_t length, const(char)* errors, int byteorder)
    version(Python_3_3_Or_Later && Python_2_6_Or_Later)
    extern (C)
    PyUnicode_EncodeUTF32
    (,,
    const(char)* errors
    ,)
  2. alias PyUnicode_EncodeUTF32 = PyUnicodeUCS2_EncodeUTF32
  3. alias PyUnicode_EncodeUTF32 = PyUnicodeUCS4_EncodeUTF32

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