Skip to content

localeCompare changes behavior between versions #4067

Description

@tmcw

Example:

~/src/documentation〉nvm use v0.10
Now using node v0.10.39 (npm v3.3.9)
~/src/documentation〉node -e "console.log('a'.localeCompare('B'))"
31
~/src/documentation〉nvm use v5
Now using node v5.1.0 (npm v3.3.12)
~/src/documentation〉node -e "console.log('a'.localeCompare('B'))"
-1

It seems likely that this change is due to an upstream V8 changes, but I can't seem to find any issues in the v8 tracker or this one discussing behavioral change with respect to the String.prototype.localeCompare method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    i18n-apiIssues and PRs related to the i18n implementation.v8 engineIssues and PRs related to the V8 dependency.

    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