[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
standards/54693: LC_TIME keywords violate POSIX
>Synopsis: LC_TIME keywords violate POSIX
>Arrival-Date: Tue Nov 12 06:00:00 +0000 2019
>Originator: AJ Jordan
NetBSD localhost 8.1 NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile GENERIC amd64
IEEE Std 1003.1-2004 ("POSIX.1") section 220.127.116.11 states:
> In a locale definition, the following mandatory keywords shall be recognized:
> [abmon] Define the abbreviated month names, corresponding to the %b conversion specification. The operand shall consist of twelve semicolon-separated strings, each surrounded by double-quotes. The first string shall be the abbreviated name of the first month of the year (January), the second the abbreviated name of the second month, and so on.
However, it turns out that NetBSD does not conform to this behavior. `locale -k abmon` does not print anything. On the other hand, `locale -k abmon_1` _does_ return "Jan", and so on and so forth. There are similar problems with `mon` and maybe some other keywords (I haven't checked).
It seems to me that this is a bug and that the locale keywords need to be changed if NetBSD wants to conform to POSIX. Note that locale(1) claims to be conformant to POSIX.1.
I found this same bug in FreeBSD; it was just recently fixed.
(For some context, I'm the maintainer of filter-other-days and in the course of trying to figure out how to do localization support, I started using `locale -k` to extract this information from the system.)
$ locale -k abmon
Main Index |
Thread Index |