Return-Path: X-Original-To: apmail-tapestry-commits-archive@minotaur.apache.org Delivered-To: apmail-tapestry-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 90D4DC0BB for ; Wed, 13 Jun 2012 15:34:43 +0000 (UTC) Received: (qmail 38479 invoked by uid 500); 13 Jun 2012 15:34:43 -0000 Delivered-To: apmail-tapestry-commits-archive@tapestry.apache.org Received: (qmail 38311 invoked by uid 500); 13 Jun 2012 15:34:42 -0000 Mailing-List: contact commits-help@tapestry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tapestry.apache.org Delivered-To: mailing list commits@tapestry.apache.org Received: (qmail 38002 invoked by uid 99); 13 Jun 2012 15:34:42 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jun 2012 15:34:42 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 8E5BE14001F for ; Wed, 13 Jun 2012 15:34:42 +0000 (UTC) Date: Wed, 13 Jun 2012 15:34:42 +0000 (UTC) From: "Takeshi Sugita (JIRA)" To: commits@tapestry.apache.org Message-ID: <440415809.12953.1339601682585.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1591250247.50884.1323293320298.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (TAP5-1778) Template parsing dependent on JVM default charset MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TAP5-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294523#comment-13294523 ] Takeshi Sugita commented on TAP5-1778: -------------------------------------- JVM's default encoding has been used to log output or console. JVM settings, it happens the effect is too large. > 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 > Priority: Minor > > 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 is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira