Replace PyUnicode_Decode(buf, strlen(buf), Py_FileSystemDefaultEncoding,

"surrogateescape") by PyUnicode_DecodeFSDefault(val).
This commit is contained in:
Victor Stinner 2010-05-07 16:34:53 +00:00
parent 56fdb75453
commit 97c18ab6a5
4 changed files with 6 additions and 11 deletions

View file

@ -2031,7 +2031,7 @@ posix_getcwd(int use_bytes)
return posix_error();
if (use_bytes)
return PyBytes_FromStringAndSize(buf, strlen(buf));
return PyUnicode_Decode(buf, strlen(buf), Py_FileSystemDefaultEncoding,"surrogateescape");
return PyUnicode_DecodeFSDefault(buf);
}
PyDoc_STRVAR(posix_getcwd__doc__,