Date: Mon, 25 Jun 2018 02:56:24 +0900 From: Hajimu UMEMOTO <ume@mahoroba.org> To: Masachika ISHIZUKA <ish@amail.plala.or.jp> Cc: freebsd-hackers@freebsd.org Subject: Re: Why is not wildcards unfolded as expected if LANG is ja_JP.UTF-8 Message-ID: <ygea7rkrruf.wl-ume@mahoroba.org> In-Reply-To: <20180625.005442.2218575156743153026.ish@amail.plala.or.jp> References: <20180625.005442.2218575156743153026.ish@amail.plala.or.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, >>>>> On Mon, 25 Jun 2018 00:54:42 +0900 (JST) >>>>> Masachika ISHIZUKA <ish@amail.plala.or.jp> 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygea7rkrruf.wl-ume>