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)
    PyUnicode_Encode
    (
    ,,
    const(char)* encoding
    ,
    const(char)* errors
    )
  2. alias PyUnicode_Encode = PyUnicodeUCS2_Encode
  3. alias PyUnicode_Encode = PyUnicodeUCS4_Encode

Parameters

s
Type: Py_UNICODE*

Unicode char buffer

size

number of Py_UNICODE chars to encode

encoding
Type: const(char)*

encoding

errors
Type: const(char)*

error handling

Meta