Hi,
The exception occurs when using the returned uri string from FileSource; not
in excalibur itself.
After a resolveURI of
file:\Program Files\MyFile.txt
or
file:\Program%20Files\MyFile.txt
and getting the source.getURI() the resulting string is
file:\Program Files\MyFile.txt
In other words, the space is back. At the moment I'm using
m_uri = uri.replaceAll(" ", "%20");
in the place of
m_uri = uri;
in method
private void init(String scheme, File file) throws SourceException
I'll look at applying URLEncoder/URLDecoder and keeping 1.3 compatible and
make a patch and push it to you.
--Roger
----- Original Message -----
From: "Berin Loritsch" <[EMAIL PROTECTED]>
To: "Avalon Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, October 02, 2003 8:42 AM
Subject: Re: Fw: Windows users/URISyntaxException?
> Roger I Martin PhD wrote:
>
> > Hi,
> >
> > It was suggested on the Lenya mailing list that I forward the following
to
> > avalon mailing list.
> >
> > It about URI resolving and Lenya not running on Windows. Lenya depends
on
> > org.apache.excalibur.source.impl.FileSource to work with uri's for files
and
> > involves the age old <SPACE> issue with Windows file system vs. other OS
for
> > uri's. See below.
>
> :/
>
> Hmmm. So is the issue that the URI doen't like
>
> file:\Program Files\MyFile.txt
>
> or that it doesn't like
>
> file:\Program%20Files\MyFile.txt
>
> ?
>
> The thing is that the .toURI() proposed in the original email is JDK 1.4
> specific. This component needs to be used in JDK 1.3 or above.
>
> The best alternative I can think of is to use the URLEncoder/URLDecoder
> to do the dirty work. If you are a Cocoon developer, then you have access
> to go ahead and apply the patch yourself. If not, then we will be happy
> to apply a patch you provide.
>
> --
>
> "They that give up essential liberty to obtain a little temporary safety
> deserve neither liberty nor safety."
> - Benjamin Franklin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]