PyUnicode_Encode

Encodes a Py_UNICODE buffer of the given size and returns a Python string object.

  1. PyObject* PyUnicode_Encode(Py_UNICODE* s, Py_ssize_t size, const(char)* encoding, const(char)* errors)
    version(Python_3_3_Or_Later)
    extern (C)
    PyUnicode_Encode
    (,,
    const(char)* encoding
    ,
    const(char)* errors
    )
  2. alias PyUnicode_Encode = PyUnicodeUCS2_Encode
  3. alias PyUnicode_Encode = PyUnicodeUCS4_Encode

Parameters

s Py_UNICODE*

Unicode char buffer

size Py_ssize_t

number of Py_UNICODE chars to encode

encoding const(char)*

encoding

errors const(char)*

error handling

Meta