You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Vlad Arkhipov (JIRA)" <xe...@xml.apache.org> on 2012/12/18 11:02:12 UTC
[jira] [Created] (XERCESJ-1598) XMLEntityManager.createOutputStream
does not decode file URI properly
Vlad Arkhipov created XERCESJ-1598:
--------------------------------------
Summary: XMLEntityManager.createOutputStream does not decode file URI properly
Key: XERCESJ-1598
URL: https://issues.apache.org/jira/browse/XERCESJ-1598
Project: Xerces2-J
Issue Type: Bug
Affects Versions: 2.11.0
Reporter: Vlad Arkhipov
org.apache.xerces.impl.XMLEntityManager.createOutputStream does not decode file URIs. It uses getPathWithoutEscapes(String) but it does not decode 2-byte escape sequences properly (for international symbols).
It may be better to get rid of this function at all. In org.apache.xerces.impl.XMLEntityManager.createOutputStream instead of
File file = new File(getPathWithoutEscapes(url.getPath()));
you may use
File file = new File(url.toURI().getPath());
which automatically decode the path in URI. Also constructing URL here is a bit overhead, URI is enough (you may convert it toURL if the protocol is not "file").
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org