summaryrefslogtreecommitdiffstats
path: root/Python/errors.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-12-17 04:47:23 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-12-17 04:47:23 (GMT)
commit1b57967b96daeb505e9d2dbe3cd347625dcb0739 (patch)
tree36cba7b2875396dcaf106fff1fbd862575762744 /Python/errors.c
parentab595943268eebef43e71e2b79e58382c28bca70 (diff)
downloadcpython-1b57967b96daeb505e9d2dbe3cd347625dcb0739.zip
cpython-1b57967b96daeb505e9d2dbe3cd347625dcb0739.tar.gz
cpython-1b57967b96daeb505e9d2dbe3cd347625dcb0739.tar.bz2
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 122e444..31fa9e2 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 */