On Thu, Apr 23, 2026 at 10:34:49AM +0200, Bruno Haible wrote:
> Hi Patrice,
> 
> > BCP47 script names cannot be numbers, numbers in subtags 4 and more
> > characters long are reserved for variants, for which they are valid.
> > For example 1901 is a registered variant.
> > https://www.rfc-editor.org/rfc/rfc5646.html#section-2.2.3
> > 
> > I attach a patch for lib/bcp47.c.
> 
> Do you have an input where the patch would make a difference?

I noticed the issue when doing unit tests for the new Texinfo
documentlanguagevariant command with made up locales data, for which I
used 1234 as variant name (by chance).  So this is not real data, but
data for tests.  Not sure that it is what you are looking for, but it is
there:
https://cgit.git.savannah.gnu.org/cgit/texinfo.git/tree/po_document/[email protected]

> I think "de-1901" and "de-1996" are such inputs, right?

Indeed.  Also, if you want more than one variant for a valid BCP47 lang:

 sl-rozaj-1994
or
 sl-rozaj-biske-1994

There is no registered variant in the IANA data with 4 characters and a
mix of numbers and letters, but, per the BCP47 description, they would
also be variants and not scripts.

-- 
Pat

Reply via email to