Skip to content

Normalize inputs to String.prototype.localeCompare #97

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 1 commit into from
Nov 20, 2023

Conversation

bnoordhuis
Copy link
Contributor

NFC-normalize the inputs, otherwise strings like "Å" and "A\u030A" (latin A with combining diacritical mark) don't compare equal.

@saghul
Copy link
Contributor

saghul commented Nov 20, 2023

I just saw your PR after I created #98. WDYT? The normalization would now be available at all times so no need for a helper function I think?

NFC-normalize the inputs, otherwise strings like "Å" and "A\u030A"
(latin A with combining diacritical mark) don't compare equal.
@bnoordhuis bnoordhuis force-pushed the string-p-localecompare branch from 1d5f606 to 1dca4a1 Compare November 20, 2023 11:35
@bnoordhuis bnoordhuis merged commit b56a82d into quickjs-ng:master Nov 20, 2023
@bnoordhuis bnoordhuis deleted the string-p-localecompare branch November 20, 2023 23:01
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