Skip to content

Support handling underscore as a Locale separator on the input #777

Open

Description

We currently reject _ as a subtag separator when parsing a locale.

This has come up in unicode-org/icu4x#3336 .

I'm questioning the value of rejecting _ as a subtag separator on the input in favor of following the Robustness Principle.

We already do not follow Unicode BCP47 Locale strictly - we accept uncanonicalized Locale, for example this works:

new Intl.Locale("EN-fr");
new Intl.DateTimeFormat("aR-Pl");

both of those work despite not being canonical, we will canonicalize them on the output!

I suggest we extend support to:

new Intl.Locale("EN_fr");
new Intl.DateTimeFormat("aR_Pl");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    c: localeComponent: locale identifierss: commentStatus: more info is needed to move forward

    Type

    No type

    Projects

    • Status

      Previously Discussed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions