py_unicode = PyString_AsDecodedObject(py_string, 'windows_1252', 'replace')
Py_DECREF(py_string)
How to convert a C string (char array) into a Python string when there are non-ASCII characters in the string?