Eric Blake wrote:
> If the file name contains problematic characters (including the : in a
> URL, or non-printable characters), then the file name is surrounded in
> quotes, and uses C escapes for the problematic characters:
> 
> program:"embedded colon:, quote\", and spaces":line: message
> program:"http://example.com/file":line: message

"C escapes" means to use the backslash character as escape character.
This is a particularly bad choice, because - as you know - on some systems,
backslahes are used as directory separator.

There are better choices for the escape character.

The thing that you want to quote are filenames and URLs. Filenames and
URLs are special cases of URIs. The syntax of URIs is defined in RFC 3986 [1].
It uses the percent character as escape character.

The use of URI syntax rather than backslash-escaping is also more understandable
to humans, because all users who use a browser eventually see a percent-escaped
URL in the main text field. Whereas backslash-escaping is known only to
programmers, a small minority among the users.

Bruno

[1] http://www.ietf.org/rfc/rfc3986.txt



Reply via email to