From owner-freebsd-current@freebsd.org Fri Nov 18 09:03:38 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3869C46291 for ; Fri, 18 Nov 2016 09:03:38 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from mail.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "asuka.mahoroba.org", Issuer "ca.mahoroba.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 05DBBF5C; Fri, 18 Nov 2016 09:03:37 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from asuka.mahoroba.org (ume@ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) (user=ume mech=DIGEST-MD5 bits=0) by mail.mahoroba.org (8.15.2/8.15.2) with ESMTPSA/inet6 id uAI93NRX015232 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 18 Nov 2016 18:03:28 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Fri, 18 Nov 2016 18:03:23 +0900 Message-ID: From: Hajimu UMEMOTO To: Jean-S9bastien P9dron Cc: freebsd-current@freebsd.org Subject: Re: Some locale data are broken In-Reply-To: <03581e2e-2379-1cd3-225c-ec49af563b28@FreeBSD.org> References: <03581e2e-2379-1cd3-225c-ec49af563b28@FreeBSD.org> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/25.1 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 10.3-STABLE X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: multipart/mixed; boundary="Multipart_Fri_Nov_18_18:03:23_2016-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.1 (mail.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Fri, 18 Nov 2016 18:03:28 +0900 (JST) X-Virus-Scanned: clamav-milter 0.99.2 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-5.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on asuka.mahoroba.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2016 09:03:38 -0000 --Multipart_Fri_Nov_18_18:03:23_2016-1 Content-Type: text/plain; charset=US-ASCII Hi, >>>>> On Fri, 18 Nov 2016 09:35:01 +0100 >>>>> Jean-S9bastien P9dron 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, --Multipart_Fri_Nov_18_18:03:23_2016-1 Content-Type: text/plain; type=patch; charset=US-ASCII Content-Disposition: attachment; filename="locale.c-prt_keywords-setlocale.diff" Content-Transfer-Encoding: 7bit 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++; --Multipart_Fri_Nov_18_18:03:23_2016-1 Content-Type: text/plain; charset=US-ASCII -- Hajimu UMEMOTO ume@mahoroba.org ume@FreeBSD.org http://www.mahoroba.org/~ume/ --Multipart_Fri_Nov_18_18:03:23_2016-1--