comparison 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
comparison
equal deleted inserted replaced
74008:880c7cffd7eb 74009:07802351ccad
353 #endif 353 #endif
354 354
355 #ifndef MS_WINDOWS 355 #ifndef MS_WINDOWS
356 if (i != 0) { 356 if (i != 0) {
357 char *s = strerror(i); 357 char *s = strerror(i);
358 message = PyUnicode_DecodeLocale(s, 1); 358 message = PyUnicode_DecodeLocale(s, "surrogateescape");
359 } 359 }
360 else { 360 else {
361 /* Sometimes errno didn't get set */ 361 /* Sometimes errno didn't get set */
362 message = PyUnicode_FromString("Error"); 362 message = PyUnicode_FromString("Error");
363 } 363 }