bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ls bug


From: Edsel Adap
Subject: ls bug
Date: Sat, 9 Mar 2002 01:32:49 -0500
User-agent: Mutt/1.2.5i

I would like to report what I think is a bug in ls.

Bug Synopsis:  ls does not honor collating sequence of selected locale

Description:
        ls always sorts its output using the C locale's collating sequence.
        That is all uppercase names are listed first before lowercase ones.

        When LANG is set to some locale other than C, (a good example is
        en_US), the collating sequence should be case insensitive -- ie. a
        name that starts with 'a' should come before a name that starts
        with 'B'.

        the ls command does not follow this.  Instead, no matter what
        locale I select, the sorting is still based on the C locale's
        collating sequence

To reproduce the bug:
        % touch a
        % touch A
        % touch b
        % touch B
        % unsetenv LANG
        % ls -1
        A
        B
        a
        b
        % setenv LANG en_US
        % ls -1
        A
        B
        a
        b

        To compare it with "sort" which follows the locale's collating
        sequence:
        % unsetenv LANG
        % ls -1 | sort
        A
        B
        a
        b
        % setenv LANG en_US
        % ls -1 | sort
        A
        a
        B
        b

Distribution: Debian GNU/Linux 2.2 (potato)

Version info:
        % ls --version
        ls (GNU fileutils) 4.0l
        Written by Richard Stallman and David MacKenzie.

        libc version is 2.1.3

        Debian Package version: fileutils 4.0l-8


-- 
Edsel Adap
address@hidden
http://www.adap.org/~edsel/          LINUX - the choice of the GNU generation

"Netscape is an application which grows to fill all available memory."  - me



reply via email to

[Prev in Thread] Current Thread [Next in Thread]