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

Meta