NetBSD Problem Report #54693

From  Tue Nov 12 05:57:43 2019
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id CF1B67A181
	for <>; Tue, 12 Nov 2019 05:57:43 +0000 (UTC)
Message-Id: <>
Date: Tue, 12 Nov 2019 05:57:42 +0000 (UTC)
Subject: LC_TIME keywords violate POSIX
X-Send-Pr-Version: www-1.0

>Number:         54693
>Category:       standards
>Synopsis:       LC_TIME keywords violate POSIX
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    standards-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 12 06:00:00 +0000 2019
>Originator:     AJ Jordan
>Release:        8.1
NetBSD localhost 8.1 NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019 GENERIC amd64
IEEE Std 1003.1-2004 ("POSIX.1")[1] section 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[3]; it was just recently fixed.

(For some context, I'm the maintainer of filter-other-days[2] 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 Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.