[
https://issues.apache.org/jira/browse/XALANJ-2461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933300#action_12933300
]
Ben Caradoc-Davies commented on XALANJ-2461:
--------------------------------------------
This bug has still not been fixed on trunk. It is still causing problems like
this for files with escaped characters in their URLs:
http://jira.codehaus.org/browse/GEOS-4228
The proposed patch does not fix other problems, such as MacOS platform brain
damage and Windows file shares. Have a look in GeoTools gt-main DataUtilities
urlToFile and fileToUrl, which does a pretty thorough job of cleaning up on a
wide range of platforms:
http://svn.osgeo.org/geotools/trunk/modules/library/main/src/main/java/org/geotools/data/DataUtilities.java
> Incorrect URL (systemId) handling : specials characters not decoded
> -------------------------------------------------------------------
>
> Key: XALANJ-2461
> URL: https://issues.apache.org/jira/browse/XALANJ-2461
> Project: XalanJ2
> Issue Type: Bug
> Security Level: No security risk; visible to anyone(Ordinary problems in
> Xalan projects. Anybody can view the issue.)
> Components: transformation
> Affects Versions: 2.7
> Environment: Windows XP SP2, Sun JDK 1.6.0_01, Xalan 2.7.0
> Reporter: Marc-Olivier PICOREAU
> Attachments: XALANJ-2461.diff
>
>
> I think there is a bug in class TransformerIdentityImpl, method
> createResultContentHandler.
> A file-URL is converted to a file simply by removing file:// or file:/ prefix.
> It works until we have URL-encoded specials characters like spaces converted
> to %20.
> String fileURL = sresult.getSystemId();
> [...]
> m_outputStream = new java.io.FileOutputStream(fileURL);
> I think the following solution would be great (already suggested in this
> issue : XALANJ-2182)
> String fileURL = sresult.getSystemId();
> File file = new File(new URI(fileURL));
> m_outputStream = new java.io.FileOutputStream(file);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]