ecma402
ecma402 copied to clipboard
Can't find a way to use the "root" collation
I expected to be able to specify the "und" locale tag with Intl.Collator, in order to access the so-called "root" collation and obtain a reasonably language-agnostic sort order (or the closest thing available). However, in Firefox and Chrome, specifying this to the constructor just causes the resolved locale to fall back to my browser UI language, and it doesn't get returned by Intl.Collator.supportedLocalesOf('und'). Changing the localeMatcher option makes no difference. Node.js also doesn't work, on either Windows or Ubuntu, even though it purports to include the "full ICU".
Am I missing something? If not, is this spec-defined or implementation-defined behaviour?
Although it's not exactly equivalent to CLDR's root collation, I also tried specifying the "ducet" collation (both in the collation option and in the tag as -u-co-ducet), but it always resolves to "default", whether I use und or a supported language.
CC @FrankYFTang @jswalden
It doesn't work in Node.js either, on either Windows or Linux (Ubuntu), even though it purports to include the "full ICU".