Hi,

>>>>> On Fri, 18 Nov 2016 09:35:01 +0100
>>>>> Jean-S9bastien P9dron <dumbb...@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,

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++;
--
Hajimu UMEMOTO
u...@mahoroba.org  u...@freebsd.org
http://www.mahoroba.org/~ume/
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to