Change getdefaultencoding() and getfilesystemencoding()
to return unicode strings.
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 9eebc14..1756834 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -214,7 +214,7 @@
static PyObject *
sys_getdefaultencoding(PyObject *self)
{
- return PyString_FromString(PyUnicode_GetDefaultEncoding());
+ return PyUnicode_FromString(PyUnicode_GetDefaultEncoding());
}
PyDoc_STRVAR(getdefaultencoding_doc,
@@ -246,7 +246,7 @@
sys_getfilesystemencoding(PyObject *self)
{
if (Py_FileSystemDefaultEncoding)
- return PyString_FromString(Py_FileSystemDefaultEncoding);
+ return PyUnicode_FromString(Py_FileSystemDefaultEncoding);
Py_INCREF(Py_None);
return Py_None;
}