[Webkit-unassigned] [Bug 282504] `new Intl.Locale('und').language` returns `undefined`, not string `'und'`
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 4 18:36:46 PST 2024
https://bugs.webkit.org/show_bug.cgi?id=282504
--- Comment #2 from lionel.rowe at gmail.com ---
(In reply to Yusuke Suzuki from comment #1)
> This is ICU issue around "und" support.
Apologies for ignorance, this is my first bug report here. Do you mean it's an issue in ICU itself? Or it's relating to a preexisting issue against WebKit's ICU implementation? Or something else?
I don't think it can be an issue in ICU itself, as ICU doesn't specify how implementations should _represent_ the various semantics (i.e. there's nothing in ICU that says an "und" locale shouldn't be represented as having a nullish "language" field). The problem is rather that ECMA-402 specifies that `GetLocaleLanguage` should return the language subtag unchanged.
>From a userland perspective, I first encountered this bug by creating `new Intl.Locale('und')` and noticing that its `language` was `undefined`, then noting that the TypeScript types appeared to be wrong. But upon checking the spec, I realized it was the implementation that was wrong, not the TS types.
![TypeScript logo superimposed over Seymour Skinner's face: "Am I out of ~~touch~~ spec?" "No, it's the ~~children~~ implementations who are wrong!"](skinner.jpg)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241105/27b09b5d/attachment-0001.htm>
More information about the webkit-unassigned
mailing list