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

[jira] [Commented] (TAP5-1778) Template parsing dependent on JVM default charset

    [ https://issues.apache.org/jira/browse/TAP5-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13982323#comment-13982323 ] 

ASF subversion and git services commented on TAP5-1778:
-------------------------------------------------------

Commit 1a37c6abd59254d3e9e6ce676cd7b300d704ecac in tapestry-5's branch refs/heads/master from [~jkemnade]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=1a37c6a ]

TAP5-2219, TAP5-1778, TAP5-1714: when transforming the template stream, use the same encoding for the input and the output


> Template parsing dependent on JVM default charset
> -------------------------------------------------
>
>                 Key: TAP5-1778
>                 URL: https://issues.apache.org/jira/browse/TAP5-1778
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Robert Coie
>            Assignee: Jochen Kemnade
>            Priority: Minor
>         Attachments: charset_5_3_5.patch
>
>
> This is my first experience with JIRA, so apologies if it is not formatted properly. I raised this topic on the tapestry-users mailing list and was asked by a couple of people there to create an issue here.
> internal.services.XMLTokenStream's openStream method contains the following lines:
> InputStreamReader rawReader = new InputStreamReader(rawStream);
> ...
> PrintWriter writer = new PrintWriter(bos);
> Both of these implicitly rely on the default JVM charset. This poses a significant problem for non-ASCII text in templates on Google App Engine, where the default is "US-ASCII". In the interests of robustness, I think it would be nice if Tapestry was able to eliminate any reliance on default charsets. I am not confident enough in my understanding of Tapestry internals to know how to appropriately retrieve symbol properties (such as "tapestry.charset") via the IoC system in internal service implementations, but I have verified that explicitly specifying "UTF-8" as follows resolved my problem:
> InputStreamReader rawReader = new InputStreamReader(rawStream, "UTF-8");
> ...
> PrintWriter writer = new PrintWriter( new OutputStreamWriter(bos, "UTF-8") );



--
This message was sent by Atlassian JIRA
(v6.2#6252)