From d1cd99b533a32e063fc4602c439da334d5a10331 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 7 Feb 2012 23:05:55 +0100 Subject: [PATCH] Backout d2c1521ad0a1: _Py_IDENTIFIER() uses UTF-8 again --- Objects/unicodeobject.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index f13a1de563a..67336bf9f19 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1744,8 +1744,9 @@ PyObject * _PyUnicode_FromId(_Py_Identifier *id) { if (!id->object) { - id->object = unicode_fromascii((unsigned char*)id->string, - strlen(id->string)); + id->object = PyUnicode_DecodeUTF8Stateful(id->string, + strlen(id->string), + NULL, NULL); if (!id->object) return NULL; PyUnicode_InternInPlace(&id->object);