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/16 15:14:16 UTC

[jira] [Comment Edited] (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=13971383#comment-13971383 ] 

Jochen Kemnade edited comment on TAP5-2219 at 4/16/14 1:12 PM:
---------------------------------------------------------------

This is actually the same problem as in TAP5-1741 and TAP5-1778.


was (Author: jkemnade):
This is actually the same problem as in TAP5-1741.

> 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
>         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)