From: Junio C Hamano Date: Fri, 14 Oct 2005 06:59:09 GMT Subject: Re: [PATCH] Try URI quoting for embedded TAB and LF in pathnames Message-ID: <7vll0wvb2a.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <87vf02qy79.fsf@penguin.cs.ucla.edu> Paul Eggert writes: > Here is the proposed format. Each file name is a string of bytes, in > one of the following two formats: > > A. A nonempty sequence of ASCII graphic characters (i.e., bytes in > the range '!' == '\041' through '~' == '\177'). The first byte > cannot be '!' == '\041' or '"' == '\042'. Leading '"' is used for > (B) below, and leading '!' is reserved for future extensions. > > B. A nonempty C-language character string literal, with the following > restrictions and modifications: > > B1. No multibyte character processing is done. Members of the > string literal are treated as bytes, not characters. Null > bytes are not allowed, and '"' == '\042', '\\' == '\134' and > '\n' == '\012' are allowed only if properly escaped as shown > below; but all other bytes are allowed. > > B2. No trigraph processing is done (e.g., ??/ stands for three > bytes, not one). > > B3. No line-splicing is done (i.e., backslash-newline is not allowed). > > B4. Only the following escape sequences are allowed. > > \" \\ \a \b \f \n \r \t \v > \XYZ (where X, Y, and Z are octal digits, X <= 3, and > at least one of the digits is nonzero) Just to let you know, I am slowly converting apply.c to accept this format, and also diff.c to produce this. I did not personally like the missing double quotes around what I did anyway, although it was easier to code.