bug-coreutils
[Top][All Lists]
Advanced

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

Re: Alignment bug in ls with UTF-8 filenames under Mac OS X


From: Bruno Haible
Subject: Re: Alignment bug in ls with UTF-8 filenames under Mac OS X
Date: Thu, 18 Jan 2007 17:39:40 +0100
User-agent: KMail/1.9.1

Jim Meyering wrote:
> As I understand the goal, you'd like to make ls act differently
> (outputting spaces, not TABs, for column alignment) on all systems
> for each line containing a non-ASCII byte.

Yes, this is what the proposed patch does.

> That change would contradict the documentation of -T

The --color option also has the effect of turning tabs into spaces; yet this
is undocumented. Actually the doc states

     `ls' uses tabs where possible in the output, for efficiency.  If
     COLS is zero, do not use tabs at all.

and the phrase "where possible" is vague enough. It is not possible to use
tabs with --color, and it is not possible to use tabs after non-ASCII
characters.

> but more 
> importantly, it would make the output significantly larger when there are
> wide columns and many lines containing a non-ASCII byte, thus penalizing
> all users in order to cater to a buggy terminal emulator.

I thought with xterm, as with most terminal emulators, the network transmit
time is negligible compared to the rendering time on the X side. Besides
that, your argument trades correctness of display against efficiency.

> I would rather simply have someone who cares about Apple Terminal
> report the bug, and in the mean time, advise people to use "-T0"
> (or set TABSIZE=0 in their environment) if they care about alignment
> when using a buggy version of that particular terminal emulator.

Vincent, do you have time to report that to the Apple people? No need to
mention 'ls' - a simple

  printf 'E\xcc\x81\t2nd column\nFoo\t2nd column\n'

should be all you need to demonstrate the bug. I'm not in such a good
position to report it, since I'm using an older version of MacOS X.

Bruno




reply via email to

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