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 20:09:18 UTC
[jira] [Created] (TAP5-2219) XML-Parsing broken if system encoding
is not UTF-8
Michael Wyraz created TAP5-2219:
-----------------------------------
Summary: 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
Affects Versions: 5.4
Reporter: Michael Wyraz
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)