Re: Alignment bug in ls with UTF-8 filenames under Mac OS X
From:
Vincent Lefevre
Subject:
Re: Alignment bug in ls with UTF-8 filenames under Mac OS X
Date:
Tue, 16 Jan 2007 05:02:08 +0100
User-agent:
Mutt/1.5.13-vl-r14963 (2007-01-09)
On 2007-01-15 20:13:02 -0700, Eric Blake wrote:
> According to Vincent Lefevre on 1/15/2007 8:05 PM:
> > Under Mac OS X 10.4.8 with ls (GNU coreutils) 5.97 (installed via
> > MacPorts), in a 80-column terminal (uxterm), I get:
> >
> > $ ls
> > É y123456789012345678901234567890
> > x123456789012345678901234567890 z123456789012345678901234567890
>
> This is yet another symptom of a much larger issue - namely,
> coreutils does not handle multi-byte locales well. The problem is
> that no one has yet written a patch that makes it easy to handle
> multibyte locales without penalizing single-byte locales.
But I don't have this problem under Linux (Debian). Note: with the
example above, one needs LC_COLLATE=en_US.UTF-8 so that the É comes
first.
$ ls
É y123456789012345678901234567890
x123456789012345678901234567890 z123456789012345678901234567890
In fact the problem seems to be due to the combining character under
Mac OS X. The filename É is encoded as 45 cc 81.
--
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)