From: Victor Stinner Date: Wed, 12 Oct 2016 11:57:45 +0000 (+0200) Subject: Fix _Py_normalize_encoding() command X-Git-Tag: v3.6.0b3~129 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ebe17e0347944b01a771eae4cee7f2a38cc82e42;p=thirdparty%2FPython%2Fcpython.git Fix _Py_normalize_encoding() command It's not exactly the same than encodings.normalize_encoding(): the C function also converts to lowercase. --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 91be6031ca52..99069cd7d6f9 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3100,9 +3100,9 @@ PyUnicode_FromEncodedObject(PyObject *obj, return v; } -/* Normalize an encoding name: C implementation of - encodings.normalize_encoding(). Return 1 on success, or 0 on error (encoding - is longer than lower_len-1). */ +/* Normalize an encoding name: similar to encodings.normalize_encoding(), but + also convert to lowercase. Return 1 on success, or 0 on error (encoding is + longer than lower_len-1). */ int _Py_normalize_encoding(const char *encoding, char *lower,