]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #13913: normalize utf-8 codec name in UTF-8 decoder
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 14 Feb 2012 00:17:45 +0000 (01:17 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 14 Feb 2012 00:17:45 +0000 (01:17 +0100)
Objects/unicodeobject.c

index f51d4d04beb5c4a004a078414474151a4c7dff41..70856f54552c2510685cbcd9cfd945b84148c98f 100644 (file)
@@ -2763,7 +2763,7 @@ PyObject *PyUnicode_DecodeUTF8Stateful(const char *s,
         outpos = p-PyUnicode_AS_UNICODE(unicode);
         if (unicode_decode_call_errorhandler(
                 errors, &errorHandler,
-                "utf8", errmsg,
+                "utf-8", errmsg,
                 &starts, &e, &startinpos, &endinpos, &exc, &s,
                 &unicode, &outpos, &p))
             goto onError;