You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In unicodedata, the functions lookup and name have some bugs and inconsistencies.
lookup matches case-insensitively, except for the algorithmic names of Hangul syllables and CJK unified ideographs, which must be in all caps. The documentation does not explain how character names are fuzzily matched.
lookup accepts names like “CJK UNIFIED IDEOGRAPH-04E00”, where the code point has a leading zero.
lookup and name don’t implement rule NR2, defined in chapter 4 of Unicode, for Tangut ideographs’ names.
Thank you for your report, @dscorbett, and for your PRs, @wismill and @SnoopJ. My apologies that it took so long to review them -- we have few Unicode experts -- but finally this was resolved.
3.13 and 3.14 will only accept the Tangut ideographs' names, but not produce them. 3.15 will also produce them.
Egyptian hieroglyphs, Khitan small script characters and Nushu characters were already supported, because their names were listed explicitly in UnicodeData.txt. But this gives us opprtunity for optimization, see #144882.
Thanks @serhiy-storchaka, glad to be of some assistance! I'm glad to see your follow-up issue as well, I was wondering about further improvements when dealing with named ranges like that as I looked over your draft PR.
Activity
dscorbett commentedon Mar 30, 2019
In
unicodedata, the functionslookupandnamehave some bugs and inconsistencies.lookupmatches case-insensitively, except for the algorithmic names of Hangul syllables and CJK unified ideographs, which must be in all caps. The documentation does not explain how character names are fuzzily matched.lookupaccepts names like “CJK UNIFIED IDEOGRAPH-04E00”, where the code point has a leading zero.lookupandnamedon’t implement rule NR2, defined in chapter 4 of Unicode, for Tangut ideographs’ names.cfbolz commentedon Oct 10, 2022
just hit the difference between
CJK UNIFIED IDEOGAPH-*,HANGUL SYLLABLE *and other unicode names again:gh-80667: Fix case-sensitivity of some Unicode literal escapes (GH-10…
pythongh-80667: Fix case-sensitivity of some Unicode literal escapes (p…
6 remaining items
gh-80667: Fix Tangut ideographs names in unicodedata (GH-144789)
[3.14] pythongh-80667: Fix Tangut ideographs names in unicodedata (py…
[3.14] gh-80667: Fix lookup for Tangut ideographs in unicodedata (GH-…
[3.14] pythongh-80667: Fix lookup for Tangut ideographs in unicodedata (
[3.13] gh-80667: Fix lookup for Tangut ideographs in unicodedata (GH-…
serhiy-storchaka commentedon Feb 16, 2026
Thank you for your report, @dscorbett, and for your PRs, @wismill and @SnoopJ. My apologies that it took so long to review them -- we have few Unicode experts -- but finally this was resolved.
3.13 and 3.14 will only accept the Tangut ideographs' names, but not produce them. 3.15 will also produce them.
Egyptian hieroglyphs, Khitan small script characters and Nushu characters were already supported, because their names were listed explicitly in UnicodeData.txt. But this gives us opprtunity for optimization, see #144882.
SnoopJ commentedon Feb 16, 2026
Thanks @serhiy-storchaka, glad to be of some assistance! I'm glad to see your follow-up issue as well, I was wondering about further improvements when dealing with named ranges like that as I looked over your draft PR.
pythongh-80667: Fix case-sensitivity of some Unicode literal escapes (p…
pythongh-80667: Fix Tangut ideographs names in unicodedata (pythonGH-…
pythongh-80667: Fix case-sensitivity of some Unicode literal escapes (p…
pythongh-80667: Fix Tangut ideographs names in unicodedata (pythonGH-…