_Py_Identifier are always ASCII strings
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 67336bf..f13a1de 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1744,9 +1744,8 @@
_PyUnicode_FromId(_Py_Identifier *id)
{
if (!id->object) {
- id->object = PyUnicode_DecodeUTF8Stateful(id->string,
- strlen(id->string),
- NULL, NULL);
+ id->object = unicode_fromascii((unsigned char*)id->string,
+ strlen(id->string));
if (!id->object)
return NULL;
PyUnicode_InternInPlace(&id->object);