Mercurial > cpython-lru_cache-weakref
diff Python/errors.c @ 74009:07802351ccad
Issue #13560: Locale codec functions use the classic "errors" parameter,
instead of surrogateescape
So it would be possible to support more error handlers later.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Sat, 17 Dec 2011 05:47:23 +0100 |
| parents | 51412b4b81ae |
| children | 6825fd9b00ed |
line wrap: on
line diff
--- a/Python/errors.c Sat Dec 17 04:59:06 2011 +0100 +++ b/Python/errors.c Sat Dec 17 05:47:23 2011 +0100 @@ -355,7 +355,7 @@ #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 */
