Skip to content

Use workaround to fix many collation failures in ICU4C. #475

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
Jul 16, 2025

Conversation

sven-oly
Copy link
Collaborator

Test generation in Python puts SMP characters (> 0xffff) as \ud8** surrogate pairs. This works OK for ICU4J, ICU4X, and NodeJS, but fails with the current CPP JSON.

This workaround adds two new items that contain the hex codes for the characters to be compared in s1 and s2. These are set for the NON_IGNORABLE and SHIFTED data files.

This is admittedly a hack, but it points out that the tests with SMP characters were not working. With this hack, over 1200 tests now pass that were previously failing.

@sven-oly
Copy link
Collaborator Author

I want to submit this, noting the hack as an issue to be resolved. WDYT?

Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have mixed feelings about this PR; it's nice that it gets C++ passing more test cases, but it is an inelegant solution that impacts the test data for all implementations.

There is no apparent reason why json-c should not be able to handle the supplemental codepoints automatically. We walked through the code together on Monday.

I will approve it, but please open a follow-up issue to clean up the tech debt.

@sven-oly sven-oly merged commit dfbc189 into unicode-org:main Jul 16, 2025
8 checks passed
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.

3 participants