Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jun 2015 23:33:36 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        freebsd-current@freebsd.org
Subject:   Re: ls is broken for non-C locales due to libxo
Message-ID:  <5580EA90.2060503@freebsd.org>
In-Reply-To: <B85C2859-D790-4A7B-93AF-2132D32259FA@xcllnt.net>
References:  <48B53C84-E4F7-4E88-B07D-7489FF585430@freebsd.org> <5580DEB0.7080908@freebsd.org> <B85C2859-D790-4A7B-93AF-2132D32259FA@xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--o9v9h7TvnimLFw6KjStrVBIOHVn7XsjPJ
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2015-06-16 23:23, Marcel Moolenaar wrote:
>=20
>> On Jun 16, 2015, at 7:42 PM, Andrey Chernov <ache@freebsd.org> wrote:
>>
>> On 17.06.2015 5:18, Andrey Chernov wrote:
>>> Recent -current, LANG=3Dru_RU.KOI8-R locale. ls -t eats whole date co=
lumn, just ls eats whole filenames with printable national characters ins=
ide. Long live libxo.
>>>
>>
>> I mean ls -l. To be precise, for 8bit non-C locales at least:
>> ls -lt: skip date column and eat filename with even single 8bit
>> character inside.
>> ls -l: just eat filename as above.
>=20
> Date/time is fixed. I don=E2=80=99t know how to reproduce the filename
> problem, so make sure sources are up-to-date and if still a
> problem, provide me with a way to reproduce.
>=20
> Thanks,
>=20
> --
> Marcel Moolenaar
> marcel@xcllnt.net
>=20

Simple reproduction:

env LANG=3Dru_RU.KOI8-R ./ls -l --libxo warn
total 200
ls: invalid UTF-8 character: c9/2
-rw-r--r--  1 allan  allan    315  Makefile
ls: invalid UTF-8 character: c9/2
-rw-r--r--  1 allan  allan    405  Makefile.depend
ls: invalid UTF-8 character: cd/2
-rw-r--r--  1 allan  allan   4922  cmp.c
ls: invalid UTF-8 character: c9/2
-rw-r--r--  1 allan  allan   4096  cmp.o
ls: invalid UTF-8 character: c9/2
-rw-r--r--  1 allan  allan   2987  extern.h
ls: invalid UTF-8 character: c9/2
-rwxr-xr-x  1 allan  allan  38934  ls
ls: invalid UTF-8 character: c9/2

It seems like the problem is that xo_utf8_to_wc_len() doesn't know how
to deal with 8 bit characters that are not UTF-8. If the highest bit is
set, but it is not UTF-8, libxo pukes.

--=20
Allan Jude


--o9v9h7TvnimLFw6KjStrVBIOHVn7XsjPJ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQIcBAEBAgAGBQJVgOqbAAoJEBmVNT4SmAt+yaoQALkESUUfR3f+D5lEKbRyhxr+
DcOk4N04xWVzAekmmnjU/9m9tTsxlU6jeZoA9fd4W9Y0zmc+8pGZgOUoymkZHV09
vcvq/vnz+CvHjFjJS27EKHcFQFj6yGsjRCtAcQZv2ejZETRIoN1ZDTffet0KXO70
QIGyFyffrp5fG/0gYhKv8f9sfPBHljGABMmuqciVeDsfsNjMbj40JcPrc57oQb3j
ng4Sfv9vt57+7jfW2O+pfE//B2b9mI1KDHB9rl/Gi7yxlOdQfwWt+gaUvtxVyYk/
OsW/wJi2ROr+PMv9SmNm3DQx3xVDQbzhTPsq0w0aeLHlmtEE8gh90jcxlTFhFZDA
NmMc+dQ7J1Gnz/xr4cDBfAIVbwK7+fqBncvAvR1keqUCBDPHZ5fqOIEnN3qU9Noi
O2YUAFpz3QF4uPm5xeCJ9MJbhwtiF/fQT4V2SbcEj2abHiGzA1DLL/j95zLY8594
qNKJpRZVYrL/4h59EAje3IuSArWc7cnGRJJ2Rcz8a9a83vx4F+pyYen7U5mwxttQ
1jb9t9z40K7L0xkTjc0jJBHaqwALeCmIg7kbjzVMas0f8MBVXfqLcfuVUnHwM+Rt
iKMTwEkXdu9eHKh2GveMU/sRGHd+EA6MBPmQih4lL7QKWpOF+lIu/gDdcrADfmWT
9qS1kB23cxzxuZAdGL+t
=yCLL
-----END PGP SIGNATURE-----

--o9v9h7TvnimLFw6KjStrVBIOHVn7XsjPJ--



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