Skip to content

Improved support for localeCompare #10617

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

Open
3 tasks done
fpaaske opened this issue Sep 4, 2024 · 0 comments
Open
3 tasks done

Improved support for localeCompare #10617

fpaaske opened this issue Sep 4, 2024 · 0 comments
Labels
bug-pending-triage Reported bug, pending triage to confirm.

Comments

@fpaaske
Copy link

fpaaske commented Sep 4, 2024

Issue Description

A small followup on #7810;

I've tested this on Node, Safari, Edge and Chrome, they all produce the expected outcome for me:

['æ','ø','å','Å','Æ','Ø', 'A', 'a', 'B', 'b'].sort((a, b) => a.localeCompare(b, 'nb', {sensitivity:'case', usage: 'sort'}))
[
"a",
"A",
"b",
"B",
"æ",
"Æ",
"ø",
"Ø",
"å",
"Å"
]

So I'd assume that this should also be supported in NativeScript with V8?
But it seems like the locale and option parameters are completely ignored.

Is this still something that's out of NativeScript's control?

Reproduction

Create an array with 'æ', 'ø', and 'å', sort with localeCompare as the example above.
The array is now incorrectly sorted as 'å', 'æ', 'ø'.

Relevant log output (if applicable)

No response

Environment

No response

Please accept these terms

@fpaaske fpaaske added the bug-pending-triage Reported bug, pending triage to confirm. label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-pending-triage Reported bug, pending triage to confirm.
Projects
None yet
Development

No branches or pull requests

1 participant