users@jsf-extensions.java.net

ENCODING Problem -> javax.faces.request.charset

From: Matthias Unverzagt <matthias.unverzagt_at_enpasos.com>
Date: Tue, 12 Jun 2007 08:35:15 +0200

I have a typical foreigner problem: It's about encoding.
I wrote a little VWP test application (on latest NB6, Glassfish V2): One
page, one textfield
and static text following Hong's simple ajax-zone example
(http://blogs.sun.com/honglu/entry/walking_through_creating_a_simple).
The idea is: You enter a character in the textfield, onkeydown you get
an ajax request that is responsible for putting the entered character on
the static text. However, I can not get the encoding work.

Switching on the NetBeans HTTP monitor I get


FIRST REQUEST OF THE PAGE
before the request:
javax.faces.request.charset = UTF-8
after the request:
javax.faces.request.charset = UTF-8

FIRST AJAX BASED REQUEST
before the request:
javax.faces.request.charset = UTF-8
after the request:
javax.faces.request.charset = ISO-8859-1

SUBSEQUENT AJAX REQUESTs
before the request:
javax.faces.request.charset = ISO-8859-1
after the request:
javax.faces.request.charset = ISO-8859-1


Any help, especially short-term workarounds are very much appreciated.

Thank you,

Matthias