On Fri, Jan 6, 2012 at 10:16 PM, Josh Canfield <[email protected]>wrote:
> I believe you want to define UTF8 for both the reader and the writer. > Good catch. Thank you. Will fix that. > > Setting the file.encoding only masks the real problem of not fully > supporting XML for templates. > Reading the encoding from the XML file requires the template to be read and parsed twice. Is it worth? I think it's not as most of users are perfectly fine with using utf8. > > On Fri, Jan 6, 2012 at 4:39 AM, <[email protected]> wrote: > > Author: drobiazko > > Date: Fri Jan 6 12:39:58 2012 > > New Revision: 1228156 > > > > URL: http://svn.apache.org/viewvc?rev=1228156&view=rev > > Log: > > TAP5-1741: Using UTF8 for template's input stream > > > > Modified: > > tapestry/tapestry5/trunk/build.gradle > > > > tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/XMLTokenStream.java > > > > Modified: tapestry/tapestry5/trunk/build.gradle > > URL: > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/build.gradle?rev=1228156&r1=1228155&r2=1228156&view=diff > > > ============================================================================== > > --- tapestry/tapestry5/trunk/build.gradle (original) > > +++ tapestry/tapestry5/trunk/build.gradle Fri Jan 6 12:39:58 2012 > > @@ -97,7 +97,7 @@ subprojects { > > > > systemProperties["tapestry.service-reloading-enabled"] = "false" > > > > - jvmArgs("-XX:MaxPermSize=512m") > > + jvmArgs("-XX:MaxPermSize=512m", "-Dfile.encoding=UTF-8") > > } > > > > task sourcesJar(type: Jar, dependsOn: classes) { > > > > Modified: > tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/XMLTokenStream.java > > URL: > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/XMLTokenStream.java?rev=1228156&r1=1228155&r2=1228156&view=diff > > > ============================================================================== > > --- > tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/XMLTokenStream.java > (original) > > +++ > tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/XMLTokenStream.java > Fri Jan 6 12:39:58 2012 > > @@ -334,7 +334,7 @@ public class XMLTokenStream > > { > > InputStream rawStream = resource.openStream(); > > > > - InputStreamReader rawReader = new InputStreamReader(rawStream); > > + InputStreamReader rawReader = new InputStreamReader(rawStream, > "UTF8"); > > LineNumberReader reader = new LineNumberReader(rawReader); > > > > ByteArrayOutputStream bos = new ByteArrayOutputStream(5000); > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Best regards, Igor Drobiazko http://tapestry5.de http://twitter.com/drobiazko
