This is extracted from runtest.c urip_testURLs and urip_rcvsURLs.
It think this check basic right behaviour for a number of cases we were
usually breaking :-\ . In the process I also fixed #306861 , but
I didn't changed the Win32 specific part of xmlCanonicPath() at the
end of uri.c, someone with windows need to look at this and bring back a
patch for cleaning up that part too.
Well, I think we can expect %20 in a file:// URL to be escaped. If it
is not flagged as such it's a grey area, the relative path could be interpreted
both ways . It is then context related, if out of context it should not be
escaped, if it was an URI-Reference say in an XInclude it should be unescaped
because we know it's an URI-Reference per the embedding spec and not a file
path. This is quite hairy to get right.