[PATCH v12 2/2] Add generic C.UTF-8 locale (Bug 17318)

Michael Hudson-Doyle michael.hudson@canonical.com
Wed Jan 26 02:44:13 GMT 2022


On Tue, 7 Sept 2021 at 03:45, Carlos O'Donell via Libc-alpha <
libc-alpha@sourceware.org> wrote:

> diff --git a/localedata/locales/C b/localedata/locales/C
> new file mode 100644
> index 0000000000..ca801c79cf
> --- /dev/null
> +++ b/localedata/locales/C


[...]


>
>
+LC_TIME
> +% This is the POSIX Locale definition for the LC_TIME category with the
> +% exception that time is per ISO 8601 and 24-hour.
> +%
> +% Abbreviated weekday names (%a)
> +abday       "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"
> +
> +% Full weekday names (%A)
> +day         "Sunday";"Monday";"Tuesday";"Wednesday";"Thursday";/
> +            "Friday";"Saturday"
> +
> +% Abbreviated month names (%b)
> +abmon       "Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";/
> +            "Oct";"Nov";"Dec"
> +
> +% Full month names (%B)
> +mon         "January";"February";"March";"April";"May";"June";"July";/
> +            "August";"September";"October";"November";"December"
> +
> +% Week description, consists of three fields:
> +% 1. Number of days in a week.
> +% 2. Gregorian date that is a first weekday (19971130 for Sunday,
> 19971201 for Monday).
> +% 3. The weekday number to be contained in the first week of the year.
> +%
> +% ISO 8601 conforming applications should use the values 7, 19971201 (a
> +% Monday), and 4 (Thursday), respectively.
> +week    7;19971201;4
>

It's obviously a bit late, but this is a difference from the Debian/Ubuntu
C.UTF-8 locale, which has:

week    7;19971130;4

(confusingly, this is preceded by this comment:

% ISO 8601 conforming applications should use the values 7, 19971130 (a
% Monday), and 4 (Thursday), respectively.

but 19971130 is a Sunday).

The locale(5) page from the man-pages project also says:

"For compatibility reasons, all glibc locales should set the value of the
second week list item to 19971130 (Sunday) and base the abday and day lists
appropriately,".

I found this because it breaks a test of rrdtool (which is probably buggy!
It sets LC_TIME but needs to clear LC_ALL for that to take any effect) and
I just wanted to check that this was truly the intended value before (even
if only just) the release.

Cheers,
mwh


> +first_weekday  1
> +first_workday  2
> +
> +% Appropriate date and time representation (%c)
> +d_t_fmt "%a %b %e %H:%M:%S %Y"
> +
> +% Appropriate date representation (%x)
> +d_fmt   "%m/%d/%y"
> +
> +% Appropriate time representation (%X)
> +t_fmt   "%H:%M:%S"
> +
> +% Appropriate AM/PM time representation (%r)
> +t_fmt_ampm "%I:%M:%S %p"
> +
> +% Equivalent of AM/PM (%p)
> +am_pm  "AM";"PM"
> +
> +% Appropriate date representation (date(1))
> +date_fmt       "%a %b %e %H:%M:%S %Z %Y"
> +END LC_TIME
>


More information about the Libc-alpha mailing list