--- gpl/axl/py-axl/py_axl.c 2011/06/08 07:09:12 1.1 +++ gpl/axl/py-axl/py_axl.c 2012/02/17 12:50:03 1.1.1.2 @@ -36,6 +36,7 @@ * info@aspl.es - http://www.aspl.es/axl */ #include +#include #define LOG_DOMAIN "py-axl" @@ -188,6 +189,21 @@ static PyMethodDef py_axl_methods[] = { PyMODINIT_FUNC initlibpy_axl (void) { PyObject * module; + + /** + * NOTE: it seems the previous call is not the appropriate way + * but there are relevant people that do not think so: + * + * http://fedoraproject.org/wiki/Features/PythonEncodingUsesSystemLocale + * + * Our appreciation is that python should take care of the + * current system locale to translate unicode content into + * const char strings, for those Py_ParseTuple and Py_BuildArg + * using s and z, rather forcing people to get into these + * hacks which are problematic. + */ + PyUnicode_SetDefaultEncoding ("UTF-8"); + /* call to initilize threading API and to acquire the lock */ PyEval_InitThreads();