diff -rupN PyQt5_gpl-5.12.3/qpy/QtCore/qpycore_qstring.cpp PyQt5_gpl-5.12.3-new/qpy/QtCore/qpycore_qstring.cpp
--- PyQt5_gpl-5.12.3/qpy/QtCore/qpycore_qstring.cpp 2019-06-25 14:41:02.000000000 +0200
+++ PyQt5_gpl-5.12.3-new/qpy/QtCore/qpycore_qstring.cpp 2019-07-19 22:54:51.248380532 +0200
@@ -158,9 +158,21 @@ PyObject *qpycore_PyObject_FromQString(c
}
-// Convert a Python Unicode object to a QString.
+// Convert a Python string object to a QString.
QString qpycore_PyObject_AsQString(PyObject *obj)
{
+#if PY_MAJOR_VERSION < 3
+ if (PyString_Check(obj))
+ {
+ const char *obj_s = PyString_AsString(obj);
+
+ if (!obj_s)
+ return QString();
+
+ return QString::fromUtf8(obj_s);
+ }
+#endif
+
#if defined(PYQT_PEP_393)
int char_size;
Py_ssize_t len;