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: Wed, 29 Oct 2003 22:07:35 +0100

> I ran into a problem recently regarding brackets "[" and "]" in
> filenames.   Could this solution also fix that problem?  Actually, I
> don't see why they are banned in the C version at all; there should be
> no escaping necessary.
archive metadata and configfiles storeing entries line by line tokenized
on spaces

i will later check whats the cause for the []'s. Sure it just didn't
conflict with ur shell?  .. adding them to the
escaping rules would be simple anyways.

> 
> While we're on the subject, perhaps a more general mechanism than
> backslash escaping should be used -- maybe percent-hex escaping like
> URLs?  That would also allow tla to support filenames with embedded
> newlines and 8-bit names easier.
> 
> -- John

I intend to support all C escaping rules with some standard conform
extensions and additionally the things we need for arch.
That includes all you mentioned above.

Thought of so far (note that uppercase escapes are reserved for
implementation specific use by the ISO C99 Standard):
\B followed by up to 8 0's or 1's: binary byte [ISO conforming
extension]
\0 octal [ISO]
\D decimal 0..255 [ISO conforming extension]
\x hex 0..ff/FF [ISO]
\Nbb`nn.. where bb is decimal 1..36: n-base encoding [ISO conforming
extension]
\' single quote [ISO]
\" double quote [ISO]
\? question mark [ISO]
\\ backslash [ISO]
\a alert/bell [ISO]
\b backspace [ISO]
\f formfeed [ISO]
\n newline [ISO]
\r carriage return [ISO]
\t horizontal tab [ISO]
\v vertical tab [ISO]
'\ ' space [NON ISO]
\u universal character name [ISO]
\U loing universal character name [ISO]

should suffice, but it will be table-driven so its quite easy to extend
or restrict. (Note that i need this expansion engine for some other
project too)

even things like converting \ to / in pathnames should become tivial,
if ever someone wants to make a native windows port.

Next important thing is that it will only escape things which didn't
worked before in tla, so it will be 100% backwards compatible.


        Christian





reply via email to

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