tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Wyraz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (TAP5-2219) XML-Parsing broken if system encoding is not UTF-8
Date Thu, 07 Nov 2013 19:09:18 GMT
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)

Mime
View raw message