Commit d1cd99b5 authored by Victor Stinner's avatar Victor Stinner

Backout d2c1521ad0a1: _Py_IDENTIFIER() uses UTF-8 again

parent cae1068e
...@@ -1744,8 +1744,9 @@ PyObject * ...@@ -1744,8 +1744,9 @@ PyObject *
_PyUnicode_FromId(_Py_Identifier *id) _PyUnicode_FromId(_Py_Identifier *id)
{ {
if (!id->object) { if (!id->object) {
id->object = unicode_fromascii((unsigned char*)id->string, id->object = PyUnicode_DecodeUTF8Stateful(id->string,
strlen(id->string)); strlen(id->string),
NULL, NULL);
if (!id->object) if (!id->object)
return NULL; return NULL;
PyUnicode_InternInPlace(&id->object); PyUnicode_InternInPlace(&id->object);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment