Re: [External] Re: [PATCH 0/1] Filter C and POSIX out of Accept-Language

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 11, 2025 at 7:26 AM Collin Funk <collin.funk1@xxxxxxxxx> wrote:

> I think the correct behavior would be to accept any values, or convert
> the current locale to the closest BCP 47 language tag.

On some Linux systems, not all BCP languages are supported. Not all
Linux distributions generate all the locales, and musl doesn't even support
locales. Converting to the closest BCP 47 language alone does not
ensure the locale is valid. Not to mention the tricky heuristics of language
matching (pt_PT or pt_BR if LANGUAGE is pt?).

> But as you mentioned converting them would require a database of all
> tags...

Hardcoding all the locale names in the code should be fine, I guess?
Though the problem of filtering out locales unsupported by glibc is more
troublesome.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux