<?xml version="1.0" encoding="UTF-8"?> is for xml file, not for the html
file.
For the html file, you need to specify the charset by such staff
<meta http-equiv="Content-Type" content="text/html; charset=GBK">

You really need to learn about the basic before purposeless test...

On 4/13/07, xu yiwei <[EMAIL PROTECTED]> wrote:

I wtite "<?xml version="1.0" encoding="UTF-8"?>"  at the first line of
Start.html.
"<p>现在时间是: ${currentTime}.</p>" same as "<p>The current time is:
${currentTime}. </p>"
Something's wrong!
The exception message:
Failure parsing template context:WEB-INF/Start.html: Invalid byte 2 of
2-byte UTF-8 sequence.
"?????: ${currentTime}."

It couldn't read " a file with the correct charset "



2007/4/13, Howard Lewis Ship <[EMAIL PROTECTED]>:
> T5 does not yet have the logic in place in T4 to allow the character
> set to be configured before reading a .properties file or HTML
> template. For the template, you should be able to set the charset
> inside the <?xml?> tag.
>
> The other aspect is output; T5 is hard coded to send, if I remember
> correctly, UTF-8, which will be hard pressed to output Chinese
> properly. So there's problems at both ends: reading a file with the
> correct charset, resulting in correct Unicode in memory, then
> outputting that unicode into the correct charset for the browser.
>
> On 4/12/07, xu yiwei <[EMAIL PROTECTED]> wrote:
> > *_zh.html could not display chinese!
> > Doesn't work!
> >
> > 2007/4/12, Kevin Lau <[EMAIL PROTECTED]>:
> > > Use the localization.
> > >
http://tapestry.apache.org/tapestry5/tapestry-core/guide/localization.html
> > >
> > > On 4/12/07, xu yiwei <[EMAIL PROTECTED]> wrote:
> > > >
> > > >   I am now trying to use T5 to develop a simple system.
> > > >   but it couldn't display the chinese.
> > > > This method did not work
> > > >   configuration.add("tapestry.supported-locales", "zh");
> > > >   i couldn't write non-ascll chars in the page(Start.html);
> > > >
> > > >                                                   will
> > > >
> > > >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > >
.....................................................................
> > > Man in the mirror
> > >
> >
> >
> > --
> > Chinese name:徐 依伟
> > English name: will
> >
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>


--
Chinese name:徐 依伟
English name: will




--
.....................................................................
Man in the mirror

Reply via email to