Re: Wildcard expansion can fail with nonprinting characters

2019-10-01 Thread Chet Ramey
On 9/30/19 8:39 PM, Geoff Kuenning wrote: > $'\361' is a valid character in Latin-1, which is how it happened to arise > in my case.  Also, I tested with the C locale, which should be agnostic to > character encodings, and got the same result. That's the strange part. I can't reproduce this with t

Re: Wildcard expansion can fail with nonprinting characters

2019-09-30 Thread Stephane Chazelas
2019-09-30 15:35:21 -0400, Chet Ramey: [...] > The $'\361' is a unicode combining > character, which ends up making the entire sequence of characters an > invalid wide character string in a bunch of different locales. [...] No, $'\u0361', the unicode character 0x361 (hex) is "COMBINING DOUBLE INVE

Re: Wildcard expansion can fail with nonprinting characters

2019-09-30 Thread Geoff Kuenning
$'\361' is a valid character in Latin-1, which is how it happened to arise in my case. Also, I tested with the C locale, which should be agnostic to character encodings, and got the same result. The general Unix philosophy, which in this case says "I'm not going to pass judgment on the weird

Re: Wildcard expansion can fail with nonprinting characters

2019-09-30 Thread Chet Ramey
On 9/27/19 7:52 PM, Geoff Kuenning wrote: > Version: > > GNU bash, version 4.4.23(1)-release (x86_64-suse-linux-gnu) > Copyright (C) 2016 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > > Behavior: > > If a pathname contains nonpri

Re: Wildcard expansion can fail with nonprinting characters

2019-09-27 Thread Stephane Chazelas
2019-09-27 16:52:50 -0700, Geoff Kuenning: [...] > $ mkdir /tmp/test$'\361'dir > $ touch /tmp/test�dir/foo > $ ls /tmp/test�dir/f* > /tmp/test?dir/foo > $ x=/tmp/test�dir > $ echo "$x" | cat -v > /tmp/testM-qdir > $ ls "$x"/f* > ls: cannot access '/tmp/test'$'\361''dir/f*': No such file or director

Wildcard expansion can fail with nonprinting characters

2019-09-27 Thread Geoff Kuenning
Version: GNU bash, version 4.4.23(1)-release (x86_64-suse-linux-gnu) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later Behavior: If a pathname contains nonprinting characters, and is expanded from a variable name,