PyUnicodeUCS4_FromEncodedObject

Coerce obj to an Unicode object and return a reference with _*incremented* refcount.

Coercion is done in the following way:

1. String and other char buffer compatible objects are decoded under the assumptions that they contain data using the current default encoding. Decoding is done in "strict" mode.

2. All other objects (including Unicode objects) raise an exception.

The API returns NULL in case of an error. The caller is responsible for decref'ing the returned objects.

  1. PyObject* PyUnicodeUCS4_FromEncodedObject(PyObject* obj, const(char)* encoding, const(char)* errors)
    version(!Python_Unicode_UCS2)
    PyUnicodeUCS4_FromEncodedObject
    (
    ,
    const(char)* encoding
    ,
    const(char)* errors
    )
  2. alias PyUnicode_FromEncodedObject = PyUnicodeUCS4_FromEncodedObject

Meta