-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Wrong sort return with Intl.Collator #39318
Labels
i18n-api
Issues and PRs related to the i18n implementation.
Comments
Update. When i use 'en' instead of 'br' it works fine. This issue only happens with 'br'. Also, this error happens with node v15.x too. |
Another update.. it's seen that 'br' only works in 14.16.x or lower. I tried 'pt-br' and works in the 14.17.x or superior. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v14.17.0
Platform
#66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
[{'name': 'CT'}, {'name': 'CH'}].sort((a, b) => {
return new Intl.Collator('br', { numeric: true, sensitivity: 'base' }).compare(a.name, b.name)
});
Run the above command in Node 17.
How often does it reproduce? Is there a required condition?
every time.
What is the expected behavior?
Output of: [ { name: 'CH' }, { name: 'CT' } ]
(Reproduces in Node 14.16.1)
What do you see instead?
Output of: [ { name: 'CT' }, { name: 'CH' } ]
Additional information
No response
The text was updated successfully, but these errors were encountered: