Skip to content

update to Unicode 18.0.0 - #75

Merged
anthrotype merged 1 commit into
masterfrom
unicode-18
Sep 17, 2026
Merged

anthrotype merged 1 commit into
masterfrom
unicode-18

Conversation

@anthrotype

Copy link
Copy Markdown
Member

This updates the generated tables to Unicode 18.0.0 and backports CPython's derived-name ranges (python/cpython#144789, python/cpython#157634), adding name()/lookup() support for Tangut, Jurchen and Small Seal characters.

Backport CPython's derived-name ranges (#144789) and Unicode 18 additions (#157634), including Tangut, Jurchen and Small Seal names.
@anthrotype

Copy link
Copy Markdown
Member Author

Most of this diff is regenerated Unicode tables. The version bumps, checksum update and adjustments to existing test code points are mechanical too.

The part worth reviewing more closely is the derived-name handling in makeunicodedata.py and unicodedata.c, backported from python/cpython#144789 and python/cpython#157634. This replaces the hard-coded CJK ranges with generated ranges and extends name()/lookup() to Jurchen and Small Seal, also fixing the older Tangut naming gap. Just regenerating the tables with the old code would leave these names missing.

The local adaptations use UNICODEDATA2_TOUPPER and a small ASCII prefix-comparison helper for PyPy compatibility. I also ported additional character-name tests from CPython, including its comparison against DerivedName.txt (downloaded from Unicode.org during test setup).

@anthrotype

Copy link
Copy Markdown
Member Author

the older Tangut naming gap

Technically this isn't specific to Unicode 18: with Unicode 17, name('\U00017000') raised ValueError and lookup('TANGUT IDEOGRAPH-17000') raised KeyError. But backporting CPython's derived-name handling fixed both.

@anthrotype
anthrotype merged commit ca7741d into master Sep 17, 2026
11 checks passed
@anthrotype
anthrotype deleted the unicode-18 branch September 17, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants