-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intl.Collator('generic') fails #2604
Comments
@kunalspathak It looks like it doesn't work in Edge 15063. When did you last observe it working in Edge? |
|
'generic' as a language tag is gramatically valid and "potentially" valid (if "registered") see the RFC 5646 Section 2.1 grammar for language tags, specifically this production:
It appears that WinGlob believes this is not a valid language tag. This could be because "generic" is not a registered language subtag under WinGlob. (It's also possible that WinGlob does not support this production of the language tag grammar.) Since IMO Intl errors should not be gated on the contents of the Intl database (consistent across all engines regardless of database content), we should simply recognize the grammar of possibly valid tags for the purposes of determining errors (which means supporting the grammar production outside of the i18n database we use). If the WinGlob database does not support this language tag, then the resulting locale set from e.g. /cc @bterlson I think the spec text is fairly clear here, but maybe there's potential for confusion on the conditional ("registered") above. What do you think? This issue can now be observed more directly via use of the
|
Tracking as part of #3644 |
gives following error.
This is happening because
Windows.globlalization.dll
here returns false andIntl.js
here throws. I tried debugging and it is the code insideBcp47Langs.dll
that returns it false. May be because it treats'generic'
as special tag and so call it as not well-formed. I didn't notice anything special about'generic'
in spec. Also this works in Edge, so might worth investigating why it doesn't work inch.exe
. This breaksnode-chakracore
while runningeslint
rules.The text was updated successfully, but these errors were encountered: