Karl Berry wrote: > Therefore, when you deal with an URI, you should use a different > algorithm of presentation within a GNU error message than when you > deal with a filename. > > This seems like it adds complexity both in the description and in > comprehension.
The long description of the algorithms was only meant to prove that someone has gone through all the details. > At least I am having trouble with it -- it seems like % > now means two different things, No, not at all. % means one thing: The proposed use for filenames and the use of % in URIs and URLs are the same. The difference is that when you pass a filename, it is not yet escaped. Whereas an URI is always transferred in escaped form between programs and machines. > and a program has to know in advance > whether the source is a url or a filename. Yes. This is a consequence of Henri's requirement, who wants that URIs and URLs be copy-pasteable and human-readable. > As an alternative, we could simply use a different character than % for > our filename hex escape. This is not simpler: - If the other character you use for escaping is one that can occur in URIs, such as '!', it means the presentation contains two layers of escaping, the one with % from RFC 2396, and the one with ! on top of it. Less simple, and does not guarantee that URIs and URLs are copy-pasteable. - If the other character you use for escaping is one that can not occur in URIs, namely '<' or '>' or '"', then URIs and URLs are copy-pasteable, but the perception for the user is that filenames and URLs are escaped in two different ways: filenames with '"' as escape character, and URLs with '%' as escape character. In summary, my proposal is easier to understand for the end user (since it uses a single escape mechanism for filenames and URLs), while the programmer has a little bit more work: he has to pass a boolean argument to specify whether he uses a filename or an URL. As always, I value simplicity for the end user higher than simplicity for the programmer. Bruno