bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: special characters in filenames in error messages


From: James Youngman
Subject: Re: special characters in filenames in error messages
Date: Sat, 29 Nov 2008 15:48:07 +0000

On Fri, Nov 28, 2008 at 6:59 PM, Karl Berry <address@hidden> wrote:
> Some months ago we discussed a convention for supporting "special"
> characters in filenames ("sources") in error messages.  Our conclusion
> then was to support C-style escapes.

I'm all for bringing a measure of consistency to this.  For error
messages, find currently uses

options.err_quoting_style = locale_quoting_style;
...
const char *
safely_quote_err_filename (int n, char const *arg)
{
  return quotearg_n_style (n, options.err_quoting_style, arg);
}

I think having just one quoting style will probably work OK for a
TTY-based world.   It's probably not such a great plan for filenames
included in documents that have other standards for safe character
encoding (HTML and JSON for example).

For the case of TTY output anyway, I think if we _do_ try to adhere to
a single standard, it would be a good idea for that to correspond to a
style constant for the gnulib quotearg module (default_gnu_style for
example).  Even if that constant has the same value as some other name
(blah_octal_quoting_style, whatever) it should have a distinct name so
that we can accommodate change later.

James.

(Sadly, other problems plague findutils, for example the incompatible
quoting schemes used by -print [uses quotearg when output is going to
a TTY] and -ls [uses a long-established but incompatible scheme].)




reply via email to

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