diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-12-17 05:47:23 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-12-17 05:47:23 +0100 |
commit | d7170a94c2cd4e21a5c81fb30344839b63bbe313 (patch) | |
tree | a41106e0b6567113803fe8af63c2a9bd1efdb75f /Python/errors.c | |
parent | 96c9b8103d067da4af4ffe86c16d08e461808f03 (diff) | |
download | cpython-d7170a94c2cd4e21a5c81fb30344839b63bbe313.tar.gz |
Issue #13560: Locale codec functions use the classic "errors" parameter,
instead of surrogateescape
So it would be possible to support more error handlers later.
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c index 122e444b82..31fa9e2955 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -355,7 +355,7 @@ PyErr_SetFromErrnoWithFilenameObject(PyObject *exc, PyObject *filenameObject) #ifndef MS_WINDOWS if (i != 0) { char *s = strerror(i); - message = PyUnicode_DecodeLocale(s, 1); + message = PyUnicode_DecodeLocale(s, "surrogateescape"); } else { /* Sometimes errno didn't get set */ |