On Wed, 2016-02-03 at 10:56 -0500, Michael Stone wrote: > On Wed, Feb 03, 2016 at 04:46:57PM +0100, you wrote: > > I'm fairly sure POSIX requires that almost all garbage can be part > > of > > filenames[1]. Also, userland still doesn't default to UTF-8 when > > no > > LC_* variable is set. This is what "ls" does then: > > > > $ LC_ALL=C ls ~/Music > > ?????????????????????????????????????????????????????? > > ?????????????????? ??????????????????????????????vs??????????????? > > ???????????? Original Sound Track > > ... > > > > (Which is pretty much the same as "ls" on non-UTF-8 filenames in an > > UTF-8 locale I mentioned in an earlier mail.) > > > > That's pretty useless. Any escaped form is more helpful. > > How? What is the escaped form?
It's not much more helpful as it is still not human-readable (for "ls -b" it's something like lots of \123\456..., with the new default something like $'\123\456...'), but it is "good enough" to be able to at least access the files in some way. Sequences of question marks of the same length don't even allow that minimal usability: if you have two files both shown as "????????", there is no easy way to inspect and rename *one* of them. If they are shown as \123\456, then I can at least copy & paste that name and use it. Which is why I think the idea of the changes implemented in the new coreutils is good in principle (though the current default quoting variant is IMHO one of the less readable ones). Ansgar

