Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Nov 2015 12:02:13 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        "Sergey V. Dyatko" <sergey.dyatko@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: /bin/ls  formatting broken for non-C(?) locales
Message-ID:  <20151120110212.GB21071@ivaldir.etoilebsd.net>
In-Reply-To: <20151120104253.GA21071@ivaldir.etoilebsd.net>
References:  <20151120110556.6e20a71f@laptop.minsk.domain> <20151120104253.GA21071@ivaldir.etoilebsd.net>

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

--NDin8bjvE/0mNLFQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Nov 20, 2015 at 11:42:53AM +0100, Baptiste Daroussin wrote:
> On Fri, Nov 20, 2015 at 11:05:56AM +0300, Sergey V. Dyatko wrote:
> > Hi,
> >=20
> > subj. http://i.imgur.com/F9QO29l.png
> > it is on head@r290573:
> > WTR:
> > env LC_ALL=3Duk_UA.UTF-8 ls -la /usr/ports/databases/ or env LC_ALL=3Dr=
u_RU.UTF-8
> > ls -la /usr/ports/databases/
> >=20
> > env LC_ALL=3DC ls -la /usr/ports/databases/ works fine
> > also on old stable/10 (r286868)  as I can see 'month' field length 3 sy=
mbols=20
> >=20
> Thanks for reporting, I can reproduce the issue with some other locales. =
The
> thing is there seems to be no standard for abbreviated length. Formerly w=
e had a
> 3 character lenght for abbreviated month.
>=20
> We now use CLDR which seems to follow the abbreviated rules from IBM:
> "Each string must be of equal length and contain 5 characters or less"
>=20
> There are 2 possible fixes: either always pad those in the locale definit=
ion
> which seems wrong or modify ls so that it by itself pads properly.
>=20
> Neither posix nor ISO-14652 defines the length of the abbreviated form
>=20
> padding in the locales themself would be wrong so I do propose to pad in =
the ls
> command. And padding with 5 characters.
>=20
> Best regards,
> Bapt

For the record glibc/linux had the same problem:
https://sourceware.org/bugzilla/show_bug.cgi?id=3D9859

"fixed" in coreutils (gnu ls) the way I propose to do for us
http://git.savannah.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommit;h=3D612b64=
7dd16d5abc03b295abe42d8b4a0fe660f7

Best regards,
Bapt

--NDin8bjvE/0mNLFQ
Content-Type: application/pgp-signature; name="signature.asc"

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

iEYEARECAAYFAlZO/bQACgkQ8kTtMUmk6EwBzQCgqKq9Vgcao47r3hMs2/Ud1vsT
hdMAnRRdTyvlDDE1RBaU6PFw3qtVKmTa
=Dhfh
-----END PGP SIGNATURE-----

--NDin8bjvE/0mNLFQ--



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