-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Implement String#unicode_normalize
and String#unicode_normalized?
#11226
Implement String#unicode_normalize
and String#unicode_normalized?
#11226
Conversation
This is inacceptable. The spec suite must be able to run without any external components. I think we could either consider incorporating the spec source data into the repository, or make the spec to run manually. |
That would be very nice to have! I just came across the need to remove diacritics from a String, and normalizing to NFD would make it super easy. I'd just name the methods without the |
I have no idea how to optimize the slow path for |
Closes #11223.
This is a WIP; the code is in a usable state, but every non-ASCII string performs a full normalization on every call to either method. Ways to optimize these methods will be implemented soon.
The spec file directly downloads the test suite from the Unicode Character Database on each invocation. This is probably better than defining all the ~18k test cases in the spec file itself.