Hello,
I've encountered a Problem in SourceResolve with
files like:
"/tmp/dir with space/fortress.xconf" (contains Spaces)
or
"c:\�bersicht\fortress.xconf" (contains german Umlaute)
The first one correctly gets encoded to the URI
"file:/tmp/dir%20with%20spaces/fortress.xconf"
The later one gets encoded to
"file:/c:\%c3%9cbersicht\fortress.xconf"
The encoding could happen for example in the getSystemResource method
of the classLoader.
configURL = ClassLoader.getSystemResource("fortress.xconf");
The Problem is: The uri will never be decoded in FileSource:
public FileSource(String uri) throws SourceException,..
{
int pos = SourceUtil.indexOfSchemeColon(uri);
if (pos == -1)
{
throw new MalformedURLException("Invalid URI : " + uri);
}
String scheme = uri.substring(0, pos);
// The URI will not be decoded
String fileName = uri.substring(pos + 1);
init(scheme, new File(fileName));
}
However under under java 1.3.1 all works fine only java 1.4.1
fails. Tried to place a decode method, but that only fixed the space
problem.
Unfortunatly I've no time to investigate further, so I worked around
this by not using SourceResolverImpl at all.
Regards Christopher
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]