GNU bug report logs - #23191
ls alignment bug

Previous Next

Package: coreutils;

Reported by: Seth Kushniryk <sethkushniryk <at> linux.com>

Date: Sat, 2 Apr 2016 19:26:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23191 in the body.
You can then email your comments to 23191 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#23191; Package coreutils. (Sat, 02 Apr 2016 19:26:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Seth Kushniryk <sethkushniryk <at> linux.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 02 Apr 2016 19:26:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Seth Kushniryk <sethkushniryk <at> linux.com>
To: bug-coreutils <at> gnu.org
Subject: ls alignment bug
Date: Fri, 1 Apr 2016 19:53:57 -0700
Hi, I've been having a minor issue with ls. It seems that sometimes the
character 'é' (e accent aigu) causes the rest of the listing to be
misaligned. My options are "-F -T 0".

Here is an example of me using it in my music library:

First Aid Kit/              Pink Floyd/                The Who/
Fleetwood Mac/              Queen/                     Ton Koopman/
Foreigner/                  Rage Against The Machine/  Trooper/
Frank Sinatra/              Red Rider/                 U2/
Félix Leclerc/             Rodriguez/                 Van Morrison/
George Harrison/            Roy Orbison/               Whitesnake/
Green Day/                  Run-DMC/                   Woody Guthrie/
Iron Butterfly/             Rush/
James/                      Simon and Garfunkel/

Renaming the directory to "Felix Leclerc" fixes the issue. I think the
problem is in "ls.c" in the function "quote_name", and what it sets for
"size_t *width".




Information forwarded to bug-coreutils <at> gnu.org:
bug#23191; Package coreutils. (Sat, 02 Apr 2016 20:06:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Seth Kushniryk <sethkushniryk <at> linux.com>
To: bug-coreutils <at> gnu.org
Subject: Re: ls alignment bug
Date: Fri, 1 Apr 2016 20:01:26 -0700
I forgot to mention that this is coreutils 8.21 in Slackware

On 01-Apr-16 19:53, Seth Kushniryk wrote:
> Hi, I've been having a minor issue with ls. It seems that sometimes the
> character 'é' (e accent aigu) causes the rest of the listing to be
> misaligned. My options are "-F -T 0".
> 
> Here is an example of me using it in my music library:
> 
> First Aid Kit/              Pink Floyd/                The Who/
> Fleetwood Mac/              Queen/                     Ton Koopman/
> Foreigner/                  Rage Against The Machine/  Trooper/
> Frank Sinatra/              Red Rider/                 U2/
> Félix Leclerc/             Rodriguez/                 Van Morrison/
> George Harrison/            Roy Orbison/               Whitesnake/
> Green Day/                  Run-DMC/                   Woody Guthrie/
> Iron Butterfly/             Rush/
> James/                      Simon and Garfunkel/
> 
> Renaming the directory to "Felix Leclerc" fixes the issue. I think the
> problem is in "ls.c" in the function "quote_name", and what it sets for
> "size_t *width".
> 




Information forwarded to bug-coreutils <at> gnu.org:
bug#23191; Package coreutils. (Wed, 16 Nov 2016 00:29:02 GMT) Full text and rfc822 format available.

Message #11 received at 23191 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Seth Kushniryk <sethkushniryk <at> linux.com>, 23191 <at> debbugs.gnu.org
Subject: Re: bug#23191: ls alignment bug
Date: Wed, 16 Nov 2016 00:28:07 +0000
unarchive 23191
tag 23191 notabug
close 23191
stop

On 02/04/16 04:01, Seth Kushniryk wrote:
> I forgot to mention that this is coreutils 8.21 in Slackware
> 
> On 01-Apr-16 19:53, Seth Kushniryk wrote:
>> Hi, I've been having a minor issue with ls. It seems that sometimes the
>> character 'é' (e accent aigu) causes the rest of the listing to be
>> misaligned. My options are "-F -T 0".
>>
>> Here is an example of me using it in my music library:
>>
>> First Aid Kit/              Pink Floyd/                The Who/
>> Fleetwood Mac/              Queen/                     Ton Koopman/
>> Foreigner/                  Rage Against The Machine/  Trooper/
>> Frank Sinatra/              Red Rider/                 U2/
>> Félix Leclerc/             Rodriguez/                 Van Morrison/
>> George Harrison/            Roy Orbison/               Whitesnake/
>> Green Day/                  Run-DMC/                   Woody Guthrie/
>> Iron Butterfly/             Rush/
>> James/                      Simon and Garfunkel/
>>
>> Renaming the directory to "Felix Leclerc" fixes the issue. I think the
>> problem is in "ls.c" in the function "quote_name", and what it sets for
>> "size_t *width".

I think the problem is your locale settings.
It looks like the file is on disk in UTF-8 (where é takes 2 bytes),
while ls(1) is running in a single byte locale such as en_US.
In that mode those bytes are interpreted by ls(1) as separate
printable characters, resulting in the misalignment.
The -T0 uses spaces rather than tabs for alignment making
the issue more likely to hit.

The fix would be to set your locale to en_US.utf8 or equivalent.

thanks,
Pádraig




Added tag(s) notabug. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 27 Oct 2018 22:13:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 23191 <at> debbugs.gnu.org and Seth Kushniryk <sethkushniryk <at> linux.com> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 27 Oct 2018 22:13:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 25 Nov 2018 12:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.