Skip to content

String::localeCompare support required. #12529

Description

@luochen1990
  • Version: v7.9.0
  • Platform: Windows 10 (64-bit)
  • Subsystem: none

The following code will print ["矮", "笨", "吃", "a", "b", "c"] in a uptodate browser, which is expected. But nodejs will print ["a", "b", "c", "吃", "矮", "笨"] for the same code, which is not reasonable for chinese users.

console.log(['矮', '吃', '笨', 'a', 'c', 'b'].sort((a, b) => a.localeCompare(b, 'zh-Hans-CN')))

Hope the String::localeCompare() function can be supported better, this is very useful for non-english-speaking users. thx :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.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