Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Nov 2015 02:57:51 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Andrey Chernov <ache@freebsd.org>
Cc:        Jilles Tjoelker <jilles@stack.nl>, "Sergey V. Dyatko" <sergey.dyatko@gmail.com>, freebsd-current@freebsd.org
Subject:   Re: /bin/ls formatting broken for non-C(?) locales
Message-ID:  <20151121015750.GG21071@ivaldir.etoilebsd.net>
In-Reply-To: <564FBEA9.7070100@freebsd.org>
References:  <20151120110556.6e20a71f@laptop.minsk.domain> <20151120104253.GA21071@ivaldir.etoilebsd.net> <20151120110212.GB21071@ivaldir.etoilebsd.net> <20151120122352.GA5751@stack.nl> <20151121003541.GF21071@ivaldir.etoilebsd.net> <564FBEA9.7070100@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--XRI2XbIfl/05pQwm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 21, 2015 at 03:45:29AM +0300, Andrey Chernov wrote:
> On 21.11.2015 3:35, Baptiste Daroussin wrote:
>=20
> > Here is what I do propose (sorry for the ugly pad_to_col name, if one h=
as better
> > please share :D
> >=20
> > https://reviews.freebsd.org/D4239
>=20
> The whole function is ugly, not only its name. Please no hardcoded
> constants assuming some internal encoding knowledge, they are wrong for
> non-UTF-8 encodings in any case, use wide chars instead.
>=20
> BTW, the same 3 chars restriction is in tar, cpio, pax, lots of ftp
> clients, i.e. where 'ls' emulated.
>=20
Updated to use wide char functions. tested with ru_RU.UTF-8 and ru_RU.KOI8-=
R,
fr_FR.UTF-8, ja_JP.eucJP and some chinese locales.

Concerning tar and cpio, I can probably push the same thing into bsdtar (wh=
ich
will fix the same issue they also have on linux), ftp is safe, pax is not a=
nd
could probably be fixed as well.

FYI on linux only ls has been fixed. gnutar uses a different format for its
output.

Bapt

--XRI2XbIfl/05pQwm
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlZPz54ACgkQ8kTtMUmk6EwMTQCeNqfmdFtXf7+cB7Kx7XPxO6ZZ
nNoAoJFJL5NLcwkQoXkvo8/lTZaRCdOH
=u3F3
-----END PGP SIGNATURE-----

--XRI2XbIfl/05pQwm--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151121015750.GG21071>