Problem: Python 3 doesn't handle multibyte characters prooperly when
'encoding' is not utf-8.
Solution: Use PyUnicode_Decode() instead of PyUnicode_FromString(). (Ken
Takata)
#ifndef PyString_Check
# define PyString_Check(obj) PyUnicode_Check(obj)
#endif
-#define PyString_FromString(repr) PyUnicode_FromString(repr)
+#define PyString_FromString(repr) \
+ PyUnicode_Decode(repr, STRLEN(repr), ENC_OPT, NULL)
#define PyString_FromFormat PyUnicode_FromFormat
#ifndef PyInt_Check
# define PyInt_Check(obj) PyLong_Check(obj)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 8,
/**/
7,
/**/