Issue #13560: Locale codec functions use the classic "errors" parameter,
instead of surrogateescape
So it would be possible to support more error handlers later.
diff --git a/Modules/main.c b/Modules/main.c
index 4899378..d8c5172 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -495,7 +495,7 @@
/* Use utf-8 on Mac OS X */
unicode = PyUnicode_FromString(p);
#else
- unicode = PyUnicode_DecodeLocale(p, 1);
+ unicode = PyUnicode_DecodeLocale(p, "surrogateescape");
#endif
if (unicode == NULL) {
/* ignore errors */