Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

localeCompare regression #25762

@yaronn

Description

@yaronn

Hi

It seems node 0.12.x has a a different behavior for localeCompare than 0.10.40.

"A".localeCompare("a")

0.12.x: 1
0.10.40: -32

the above can be fixed by using:

"A".localeCompare("a", 'en', {caseFirst: 'upper'})

but this one yields a different result and no configuration can fix it:

"a".localeCompare("Ab")

0.10.40: 32
0.12.x: -1

the different numbers are less significant - the real issue is the different sign.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions