You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2014/04/27 15:55:20 UTC

[jira] [Closed] (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:all-tabpanel ]

Jochen Kemnade closed TAP5-2219.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 5.4

> 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
>         Environment: Windows (probably linux too but most systems run with utf-8)
>            Reporter: Michael Wyraz
>            Assignee: Jochen Kemnade
>             Fix For: 5.4
>
>         Attachments: XMLTokenStreamTests.java
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> 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.2#6252)