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: Tom Lord
Subject: Re: [Gnu-arch-users] Re: ANN: Spaces in filenames
Date: Wed, 29 Oct 2003 17:21:53 -0800 (PST)

    >> miles:

    >> [use '\s' or something not '\ ']


    > chth

    > [Nah, '\ ' is more likely to trigger errors closer to where they
    > happen.]


Miles' answer is better but not quite right.

If some escape-unaware program is parsing some tla output using
whitespace delimination and tla is using '\ ', then that parsing code
is likely (not guaranteed) to get a name for a file that doesn't
exist.

If some escape-unaware program is parsing some tla output using
whitespace delimination and tla is using '\s', then that parsing code
is likely (not guaranteed) to get a name for a file that doesn't
exist.

The two are really equal in that regard.

On the other hand, consider a program like `cut' and its interaction
with a tla command like `catcfg':

If tla uses '\s', `cut' will give the right answer.   If tla uses 
'\ ', `cut' will give the wrong answer.

In general, a (now, possibly escaped) filename constitutes a "field"
on some line.  Many programs usefully process "fields" -- usually
expecting them to be whitespace delimited and almost never respecting
escapes.   Miles' solution avoids breaking the application of such
programs to tla output.

But `\s' in particular isn't obviously a great idea.   A minimal C
syntax for escapes is a de facto standard, URI escapes a real
standard.

Since these are only files, I'm a bit more inclined to favor C than
URI syntax.    So, perhaps:

        \040

(along with \t for tabs, etc.)?

-t





reply via email to

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