You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Michael Wyraz (JIRA)" <ji...@apache.org> on 2013/11/07 21:17:17 UTC
[jira] [Commented] (TAP5-2219) XML-Parsing broken if system
encoding is not UTF-8
[ https://issues.apache.org/jira/browse/TAP5-2219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13816381#comment-13816381 ]
Michael Wyraz commented on TAP5-2219:
-------------------------------------
Added a test case to demonstrate the issue.
> XML-Parsing broken if system encoding is not UTF-8
> --------------------------------------------------
>
> Key: TAP5-2219
> URL: https://issues.apache.org/jira/browse/TAP5-2219
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.4
> Reporter: Michael Wyraz
> Attachments: XMLTokenStreamTests.java
>
>
> Tapestry reads tml files in XMLTokenStream.openStream(), does some doctype "magic" and writes all the file content's into a ByteOutputStream. On T5.3 reading/writing was done using the system's caracter encoding. With T5.4 that was changed for the reader but not for the writer. This messes up all non-ascii characters if system encoding is not utf-8.
> Solution: Change
> PrintWriter writer = new PrintWriter(bos);
> To
> PrintWriter writer = new PrintWriter(new OutputStreamWriter(bos, "UTF8"));
> in XMLTokenStream.openStream().
> TODO: Unit test for XMLTokenStream (follows soon)
--
This message was sent by Atlassian JIRA
(v6.1#6144)