Doing more encoding of text already known to be a URL is not the problem I am concerned about. What I want to be certain about is whether a piece of text is a URL (therefore encoded already) or is a something that can be turned into a URL by applying the encoding. I think that the most important point is whether or not the '%' characters have been encoded - this must be done once and only once.
I have two files "a.html" and "%61.html". Given the right base, the URL "%61.html" refers to the file "a.html" and not to the file "%61.html". The URL "%2561.html" refers to the file "%61.html". From the text "%61.html" alone, it is not possible to determine which file it refers to; the context in which it occurs must unambiguously define whether or not encoding has been done.
Current practice seems to be that
<A HREF="%2562.html#%61">%2562.html#%61</A> refers to
<A NAME="%61">This is %61 in %62.html</A> and not to
<A NAME="a">This is a in %62.html</A>.
Neither anchor names not fragment identifiers behave as if encoded. If the same text is used the link works - this property would be preserved (I think!) if both were interpreted as encoded, thus adopting the RFC1808 fragment syntax without breaking existing links.
Owen Rees
<rtor@ansa.co.uk>, <URL:http://www.ansa.co.uk/Staff/rtor.html>
Information about ANSA is at <URL:http://www.ansa.co.uk/>.