Re: ls is broken for non-C locales due to libxo

From: Marcel Moolenaar <marcel_at_xcllnt.net>
Date: Wed, 17 Jun 2015 09:54:57 -0700
> On Jun 17, 2015, at 9:35 AM, Andrey Chernov <ache_at_FreeBSD.org> wrote:
> 
> Signed PGP part
> On 17.06.2015 16:58, Marcel Moolenaar wrote:
> >
> >> On Jun 16, 2015, at 9:53 PM, Andrey Chernov <ache_at_FreeBSD.org>
> >> wrote:
> >
> >> Should be no any %FF, but single char in pre libxo ls or nothing
> >> in post libxo one.
> >>
> >> Use LANG=ru_RU.KOI8-R before touch command. It looks like you
> >> create file with name "%FF" instead.
> >
> > No difference:
> >
> > fbsdvm64% env LANG=ru_RU.KOI8-R touch `env LANG=ru_RU.KOI8-R printf
> > "\377"` fbsdvm64% ls -al total 8 -rw-r--r--   1 marcel  staff    0
> > Jun 17 06:56 %FF drwxr-xr-x   3 marcel  staff  102 Jun 17 06:56 .
> > drwxr-xr-x  12 marcel  staff  408 Jun 17 06:55 ..
> 
> The original bug was fixed in r284494 by kan_at_
> 
> In any case, what you demonstrates is very strange and can be display
> (console,xterm,etc.) bug or probably libxio bug, because ls alone
> _never_ use %xx encoding, it should print '?' for invalid character or
> just character itself for valid ones.

Good point. I’ll try various things (esp. compare against 10).

--
Marcel Moolenaar
marcel_at_xcllnt.net


Received on Wed Jun 17 2015 - 14:55:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:58 UTC