On Tue, 30 Jun 2026 20:27:44 GMT, Justin Lu <[email protected]> wrote:
> Without the correct compatibility extension, "JP" or "TH" are merely
> ill-formed variants, so throwing should be acceptable. And the locale must
> match `Locale("ja", "JP", "JP")`, so an extra script is already covered as
> not matching exactly. Is this not already adequate?
>
> I am happy to clarify further if needed, but I was inclined to not add
> documentation because this is not a common case.
Yes, I would like clarification on this.
Since these legacy locales predate script and extension, my understanding is
that `lang=ja`, `ctry=JP`, and `variant=JP` are the required conditions for the
locale to be considered a legacy locale, with the `-x-lvariant-JP` extension
being implicitly required. (Similarly for `th_TH_TH`)
Given that, adding clarification for cases involving a contradicting calendar
or a non-empty script would be helpful for users, IMO.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/31728#issuecomment-4847843803