Some locale data are broken
Hajimu UMEMOTO
ume at FreeBSD.org
Fri Nov 18 09:03:38 UTC 2016
Hi,
>>>>> On Fri, 18 Nov 2016 09:35:01 +0100
>>>>> Jean-S9bastien P9dron <dumbbell at FreeBSD.org> said:
dumbbell> What looks incorrect to me is the output of `locale -k` when no keyword
dumbbell> is specified:
dumbbell> $ LANG=fr_FR.UTF-8 LC_ALL=fr_FR.UTF-8 locale -k
dumbbell> ...
dumbbell> d_fmt="%m/%d/%y"
dumbbell> ...
dumbbell> altmon_1="January"
dumbbell> ...
dumbbell> $ LANG=fr_FR.UTF-8 LC_ALL=fr_FR.UTF-8 locale -k d_fmt
dumbbell> d_fmt="%d.%m.%Y"
dumbbell> $ LANG=fr_FR.UTF-8 LC_ALL=fr_FR.UTF-8 locale -k altmon_1
dumbbell> altmon_1="janvier"
How about this patch?
Sincerely,
-------------- next part --------------
Index: usr.bin/locale/locale.c
===================================================================
--- usr.bin/locale/locale.c (revision 308220)
+++ usr.bin/locale/locale.c (working copy)
@@ -283,8 +283,9 @@
/* process '-c', '-k', or command line arguments. */
if (prt_categories || prt_keywords || argc > 0) {
+ if (prt_keywords)
+ setlocale(LC_ALL, "");
if (argc > 0) {
- setlocale(LC_ALL, "");
while (argc > 0) {
showdetails(*argv);
argv++;
-------------- next part --------------
--
Hajimu UMEMOTO
ume at mahoroba.org ume at FreeBSD.org
http://www.mahoroba.org/~ume/
More information about the freebsd-current
mailing list