NetBSD Problem Report #54693
From firstname.lastname@example.org Tue Nov 12 05:57:43 2019
Received: from mail.netbsd.org (mail.netbsd.org [220.127.116.11])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id CF1B67A181
for <gnats-bugs@gnats.NetBSD.org>; Tue, 12 Nov 2019 05:57:43 +0000 (UTC)
Date: Tue, 12 Nov 2019 05:57:42 +0000 (UTC)
Subject: 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:/usr/src/sys/arch/amd64/compile GENERIC amd64
IEEE Std 1003.1-2004 ("POSIX.1") section 18.104.22.168 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
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.