You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tchepannou Hervé <He...@tech-nter.com> on 2003/11/03 17:56:29 UTC
encoding problems with Tapestry-2.x
When Im entering caracters with accent (french character like é, ç etc) in tapestry form @Input component,
when the form get rewinded, those character are replaced in the @Input component by strange character.
I suspect that its bc tapestry uses UTF-8 for encoding.
Is there a place where I can change the default Tapestry encoding?
thanx
Herve Tchepannou
Technologies Nter Inc.
1801, Avenue McGill College, Bureau 930
Montréal (Québec) H3A 2N4
http://www.ntertechnologies.com
(514) 987-2050 poste 4079
Re: encoding problems with Tapestry-2.x
Posted by Rob Van Mieghem <ro...@axelera.net>.
I had the same problem a while and mindbridge told me to check out the
following link:
>This problem was comprehensively handled in Tapestry 3.0 beta-2 and further.
>If you can, please use that version. You should not encounter this issue
>with it.
>
>If you cannot and you need to use 2.x, please see this link:
>http://tapestry.sourceforge.net/wiki/index.php/EnablingUnicode
>
>It gives a workaround for earlier versions and should resolve the problem as
>well (but with some more work)
>
>I hope this helps
>-mb
>
The problem is basically that in Tapestry 2.x in BasePage:
public IMarkupWriter getResponseWriter(OutputStream out)
{
return new HTMLWriter(out);
}
and the constructor of HTMLWriter:
public HTMLWriter(OutputStream outputStream)
{
this("text/html; charset=utf-8", outputStream);
}
Override getResponseWriter in your page : (charset is hardcoded here, should be your systems locale)
public IMarkupWriter getResponseWriter(OutputStream out) {
return new HTMLWriter("text/html; charset=iso-8859-1",out);
}
Greetings,
Rob
Tchepannou Hervé wrote:
>When Im entering caracters with accent (french character like é, ç etc) in tapestry form @Input component,
>when the form get rewinded, those character are replaced in the @Input component by strange character.
>I suspect that its bc tapestry uses UTF-8 for encoding.
>Is there a place where I can change the default Tapestry encoding?
>thanx
>
>
>Herve Tchepannou
>
>Technologies Nter Inc.
>1801, Avenue McGill College, Bureau 930
>Montréal (Québec) H3A 2N4
>http://www.ntertechnologies.com
>
>(514) 987-2050 poste 4079
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org