toUtf8 -> toLocal8Bit

This commit is contained in:
Maijin 2018-03-02 21:49:57 +01:00
parent e52d002fea
commit 06a9507aea

View File

@ -22,7 +22,7 @@ PyObject *api_cmd(PyObject *self, PyObject *args)
char *result = (char*) "";
if (PyArg_ParseTuple(args, "s:command", &command))
{
result = Core()->cmd(command).toUtf8().data();
result = Core()->cmd(command).toLocal8Bit().data();
}
return PyUnicode_FromString(result);
}
@ -34,7 +34,7 @@ PyObject *api_cmdj(PyObject *self, PyObject *args)
char *result = (char*) "";
if (PyArg_ParseTuple(args, "s:command", &command))
{
result = Core()->cmd(command).toUtf8().data();
result = Core()->cmd(command).toLocal8Bit().data();
PyObject *jsonModule = PyImport_ImportModule("json");
PyObject *loadsFunc = PyObject_GetAttrString(jsonModule, "loads");
if (!PyCallable_Check(loadsFunc)) {