Skip to content

String.localeCompare with sensitivity:"accent" works incorrectly for Turkish dotless/dotted "i" #34608

Description

@andrew-z
  • Version: 12.18.0
  • Platform: Windows (64-bit), version 2004

What steps will reproduce the bug?

"Istanbul".localeCompare("istanbul", "tr-TR", { usage: "search", sensitivity: "accent" })

How often does it reproduce? Is there a required condition?

Reproduces every time

What is the expected behavior?

"I" is not a capitalization of "i" in Turkish, so it should return a non zero value.

What do you see instead?

This returns 0.

Additional information

In new (Chromium-based) Edge browser console, I see "-1" output instead.

On the other hand, "istanbul".toLocaleUpperCase("tr-TR") works correctly in Node and returns "İSTANBUL"

Metadata

Metadata

Assignees

No one assigned

    Labels

    i18n-apiIssues and PRs related to the i18n implementation.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions