I had the same problem with Tapestry 3.02 and I think it is still in 4.0.
Somehow
Tapestry doesnt' set up content type properly. Looking at html source from
Tapestry,
the <meta> for content type is not the first <meta> but the second <meta> in
the <header>.
I have read somewhere, that content type <meta> must be the first in
<header> otherwise it is ignore.

I came with workaround. I use web-app <filter> and in that I force utf-8:

 public void doFilter(ServletRequest servletRequest, ServletResponse
servletResponse,
            FilterChain filterChain) throws IOException, ServletException {
  try  {
      HttpServletRequest httpServletRequest = (HttpServletRequest)
servletRequest;
            servletRequest.setCharacterEncoding("UTF-8");
            servletResponse.setContentType( "text/html; charset=UTF-8" );


It is ugly but it works.

Lubos

On 1/31/06, Jérôme BERNARD <[EMAIL PROTECTED]> wrote:
>
> Usually you should suspect somewhere a wrong encoding used through the
> flow
> of your system.
>
> Check the following points:
> - is your database storing content in UTF-8 (should you use one)?
> - are your Tapestry templates written in UTF-8 and specifying a proper
> content type (<*meta* http-equiv="Content-Type" content="text/*html*
> ;charset=*utf-8*" />)?
> - your properties files encodings (you just did).
>
> Have a look at
> http://java.sun.com/developer/EJTechTips/2005/tt1220.html#2for
> more details.
>
> Regards,
> Jérôme.
>
> On 1/31/06, Brian Long <[EMAIL PROTECTED]> wrote:
> >
> > Jérôme,
> >
> > Good question, I'm using XP SP2 and the file was created from eclipse
> > using new file -> myproject.properties. I went back and checked to see
> > what encoding eclipse was using for the *.properties files and found
> > that these are encoded as ISO-8859-1by default, so I changed this to
> > UTF-8. Stopped tomcat, crossed my fingers, counted to ten, rubbed my
> > lucky rabbits foot then restarted the application, but when I checked
> > the page, same familiar sight!
> >
> > So in summary, previously I haven't been using a UTF-8 encoded file,
> > but even when I do, I still get a € to ? conversion . . .
> >
> > >Brian.
>

Reply via email to