Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Nov 2015 01:27:01 +0100
From:      Baptiste Daroussin <bapt@freebsd.org>
To:        Andrey Chernov <ache@freebsd.org>
Cc:        Ed Schouten <ed@nuxi.nl>, Jilles Tjoelker <jilles@stack.nl>, "Sergey V. Dyatko" <sergey.dyatko@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: /bin/ls formatting broken for non-C(?) locales
Message-ID:  <20151125002701.GD70014@ivaldir.etoilebsd.net>
In-Reply-To: <20151125001513.GC70014@ivaldir.etoilebsd.net>
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> <CABh_MK=cz-zB7krcnKjhqfW9VnwjSmuaZ9%2BAETQiLy3AsHq_vw@mail.gmail.com> <5650DACA.2090501@freebsd.org> <20151125001513.GC70014@ivaldir.etoilebsd.net>

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

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

On Wed, Nov 25, 2015 at 01:15:13AM +0100, Baptiste Daroussin wrote:
> On Sat, Nov 21, 2015 at 11:57:46PM +0300, Andrey Chernov wrote:
> > On 21.11.2015 15:18, Ed Schouten wrote:
> > > Hi Baptiste,
> > >=20
> > > I suppose you should use the wcswidth() function somewhere to compute
> > > the visible width of the month name. Some characters may be
> > > double-width, others may have no effective width at all.
> > >=20
> >=20
> > I agree. Checking error return of wide chars functions with some
> > fallback will be good too.
>=20
> I have updated the code https://reviews.freebsd.org/D4239
>=20
> Tested by modifying some locales to add double width and zero width unico=
de in
> the locales
>=20
> Also added the error checking for the return of wide chars functions. For=
 now I
> haven't added fallback, suggestions welcome if needed.
>=20
> Best regards,
> Bapt

Actually I can make the fallback on the C locale in case of failure. Would =
that
work for you?

Best regards,
Bapt

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

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

iEYEARECAAYFAlZVAFUACgkQ8kTtMUmk6Ex6QgCeN81r9IqSIB9ZOZB9yBgHwDAc
f7AAnRWHnV9GmauE9pHQ/8WoO40rsool
=N6TB
-----END PGP SIGNATURE-----

--0/kgSOzhNoDC5T3a--



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