From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18865 invoked from network); 9 Jan 2005 15:35:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Jan 2005 15:35:58 -0000 Received: (qmail 50635 invoked from network); 9 Jan 2005 15:35:52 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Jan 2005 15:35:52 -0000 Received: (qmail 28614 invoked by alias); 9 Jan 2005 15:35:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20656 Received: (qmail 28599 invoked from network); 9 Jan 2005 15:35:49 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Jan 2005 15:35:49 -0000 Received: (qmail 50367 invoked from network); 9 Jan 2005 15:35:49 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 9 Jan 2005 15:35:45 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id ABDCB7004A; Sun, 9 Jan 2005 10:35:43 -0500 (EST) Date: Sun, 9 Jan 2005 10:35:43 -0500 From: Clint Adams To: zsh-workers@sunsite.dk, "Benjamin Hill (Mako)" , 289442-forwarded@bugs.debian.org Subject: Re: Bug#289442: zsh: completions do not respect LC_COLLATE Message-ID: <20050109153543.GA7922@scowler.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 > Thanks for maintaining zsh Clint! > > AFAICT, results returned by tab completions to do not respect > LC_COLLATE. Preferabley, zsh should sort completions according to > whatever LC_COLLATE is set to at the time the completions are > presented. > > To reproduce the bug, go into a directory with upper case and > lowercase filenames. Set LC_COLLATE to C or POSIX and you should see > case sensative sorting for a command like ls and in the completions of > the ls command. Now set LC_COLLATE to, for example, en_US.UTF-8 which > sorts case insensatively. The behavior will be changed for ls but not > for tab completions of ls from within zsh. > > Invoking zsh with the LC_COLLATE set does not alter this behavior. There were some concerns with locale-specific collation order in the past with respect to surprise data loss when globbing. http://www.zsh.org/mla/users/1998/msg00740.html http://www.zsh.org/mla/workers/1999/msg02226.html However, the real issue with your sorting problem seems to be the use of a comparison function that ignores locale and behaves differently depending on the setting of the NUMERIC_GLOB_SORT option. I think we could change the character comparison at the end of setbpcmp() to a strcoll(), or do setxfrm()'s at the beginning.