[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: filenames in error messages
From: |
Bruno Haible |
Subject: |
Re: filenames in error messages |
Date: |
Thu, 14 Feb 2008 04:41:48 +0100 |
User-agent: |
KMail/1.5.4 |
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
- Re: quotearg improvements, (continued)
- Re: quotearg improvements, Jim Meyering, 2008/02/13
- Re: quotearg improvements [was: filenames in error messages], Karl Berry, 2008/02/13
- Re: quotearg improvements [was: filenames in error messages], Eric Blake, 2008/02/13
- Re: quotearg improvements [was: filenames in error messages], Karl Berry, 2008/02/13
- Re: quotearg improvements [was: filenames in error messages], Eric Blake, 2008/02/13
- Re: quotearg improvements [was: filenames in error messages], Bruno Haible, 2008/02/13
- Re: quotearg improvements [was: filenames in error messages], Eric Blake, 2008/02/13
- quotearg and trigraphs [was: quotearg improvements], Eric Blake, 2008/02/13
- Re: quotearg and trigraphs [was: quotearg improvements], Eric Blake, 2008/02/16
Re: filenames in error messages, Karl Berry, 2008/02/07
Re: filenames in error messages,
Bruno Haible <=
Re: filenames in error messages, Bruno Haible, 2008/02/14