tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Drobiazko <igor.drobia...@gmail.com>
Subject Re: svn commit: r1228156 - in /tapestry/tapestry5/trunk: build.gradle tapestry-core/src/main/java/org/apache/tapestry5/internal/services/XMLTokenStream.java
Date Mon, 09 Jan 2012 20:51:47 GMT
On Fri, Jan 6, 2012 at 10:16 PM, Josh Canfield <joshcanfield@gmail.com>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,  <drobiazko@apache.org> 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: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de
http://twitter.com/drobiazko

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message