Skip to content

Fix internalSkeleton #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 24, 2025
Merged

Conversation

ohhithere
Copy link
Contributor

While going over UTS #39 I noticed that the internalSkeleton function is defined as:

  1. Convert X to NFD format, as described in UAX15.
  2. Remove any characters in X that have the property Default_Ignorable_Code_Point.
  3. Concatenate the prototypes for each character in X according to the specified data, producing a string of exemplar characters.
  4. Reapply NFD.

But in the current implementation, we leave out step 2 which probably does not change the behaviour in most cases. Still, it is likely a good idea to fix this.

This pull request adds this step.

Notes:

  • I took the liberty to refactor load_properties in unicode.py to effectively remove a copy of the function.
  • I regenerated the tables as is. There seem to have been some changes to the IDENTIFIER_TYPE table upstream which are included here in addition to the new table.

@Manishearth Manishearth merged commit eb9d304 into unicode-rs:master Feb 24, 2025
3 checks passed
@Manishearth
Copy link
Member

Thanks!

@ohhithere ohhithere deleted the fix-internal-skeleton branch February 24, 2025 20:46
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