gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: ANN: Spaces in filenames


From: Christian Thäter
Subject: Re: [Gnu-arch-users] Re: ANN: Spaces in filenames
Date: Thu, 30 Oct 2003 00:48:54 +0100

> On Wed, Oct 29, 2003 at 11:35:48PM +0100, Christian Th?ter wrote:
> > For now I implement it in the proprosed way, the escaping scheme is
> > trivial to change even to HTML encoding as i told before. So first
> > implementation later optimization.
> 
> The question of whether higher levels need to worry about escapes or
> not is pretty fundamental; it's _not_ just a matter of `optimization.'
> 
> IOW, existing code assumes that filenames have certain
> characteristics, one of them being a lack of whitespace.  The escaping
> code should not require changing these assumptions (as allowing '\ '
> would).

that is rather a pro for the `\ ` ... existing code which is not
escapes-aware will very likely not parse that correctly and hopefully
exit with an error, while '\S' or '\040' will be correctly parsed as
(illegal) name this delays the error unnessecary if even one is
generated. So code which need to be escape-aware need to be compatible
with whatever escaping scheme we use, no way around.

My only worries is that the weakest and most common language used for
tools (shell) gets something hard to handle. But look:

$ cat foo
a\ b c d
$ cat foo | (read a b c d ; echo " 'a:$a' 'b:$b' 'c:$c' 'd:$d'" )
 'a:a b' 'b:c' 'c:d' 'd:'

        Christian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]