From owner-freebsd-hackers@freebsd.org Sun Jun 24 17:56:45 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B17CE1006EE5 for ; Sun, 24 Jun 2018 17:56:45 +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 E83BE71330 for ; Sun, 24 Jun 2018 17:56:44 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from vsuiko.mahoroba.org (vsuiko.mahoroba.org [IPv6:2001:2f0:104:8010:a00:27ff:feb0:c2e]) (user=ume mech=DIGEST-MD5 bits=0) by mail.mahoroba.org (8.15.2/8.15.2) with ESMTPSA/inet6 id w5OHuO04044441 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Mon, 25 Jun 2018 02:56:29 +0900 (JST) (envelope-from ume@mahoroba.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mahoroba.org; s=20081103; t=1529862989; bh=cBdGuezLWy9ysMap8KK6D8Hf0C6k/a+ALK3J7bK7ZcM=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=uPiLoYVwVNi/jP9LWqL5GZ5zzpN4mQhJj8qKaUOD8mc6quf3lVCu4VAl/c95fsn5g CIAlEtwCzulE8Qfmhsu3TdIthnlDNCjrZ+QNRFwpaG4ECS0vjOz8bwpke9DHk0l3kq 8EpeTievu8MPfpsvMv5jMhafryAMIxpQTNoVEgb8= Date: Mon, 25 Jun 2018 02:56:24 +0900 Message-ID: From: Hajimu UMEMOTO To: Masachika ISHIZUKA Cc: freebsd-hackers@freebsd.org Subject: Re: Why is not wildcards unfolded as expected if LANG is ja_JP.UTF-8 In-Reply-To: <20180625.005442.2218575156743153026.ish@amail.plala.or.jp> References: <20180625.005442.2218575156743153026.ish@amail.plala.or.jp> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/26.1 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 11.2-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: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.mahoroba.org [IPv6:2001:2f0:104:8010:0:0:0:1]); Mon, 25 Jun 2018 02:56:29 +0900 (JST) X-Virus-Scanned: clamav-milter 0.100.0 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2018 17:56:45 -0000 Hi, >>>>> On Mon, 25 Jun 2018 00:54:42 +0900 (JST) >>>>> Masachika ISHIZUKA said: ish> I can't expand wildcards as expected if I use 'setenv LANG ja_JP.UTF-8'. ish> For example, It seems to me as expected behavior. ish> % ls ish> a A b B c C d D e E ish> % setenv LANG ja_JP.UTF-8 ish> % ls [b-d] ish> b B c C d <=== It's not good. ish> % env LANG=ja_JP.UTF-8 ls [b-d] ish> b B c C d <=== It's not good. ish> % env LANG=C ls [b-d] ish> B C b c d <=== It's not good. Since the expansion of '[]' is done by the shell (tcsh) itself, setting LANG by env(1) doesn't have an influence on the expansion. ish> This happens on 12-current and 11.2-RC3. I'm using tcsh but the same ish> when changed to bash. It's because the recent FreeBSD supports collation. If you don't like the behavior, you may want to set LC_COLLATE to C. % echo $LANG ja_JP.UTF-8 % ls a A b B c C d D e E % env LANG=ja_JP.UTF-8 tcsh -c "ls [b-d]" b B c C d % env LANG=C tcsh -c "ls [b-d]" b c d % env LANG=ja_JP.UTF-8 LC_COLLATE=C tcsh -c "ls [b-d]" b c d Sincerely, -- Hajimu UMEMOTO ume@mahoroba.org ume@FreeBSD.org http://www.mahoroba.org/~ume/