For Wicket, try setting this *:
getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
in your Application#init
If you don't set the default markup encoding explicitly, the default for it is
the 'os provided encoding' (see:
IMarkupSettings#getDefaultMarkupEncoding)
If Tomcat, add URIEncoding="UTF-8" to your connector.
Am 10.05.2010 15:49, schrieb Eike Kettner:
Hi Matt
some long time ago I had a similiar problem with AjaxEditableLabel. I
used tomcat and there you need to configure the connector using
"useBodyEncodingForURI=true" to make tomcat use utf8 for encoding ajax
requests.
<Connector port="8009" protocol="AJP/1.3"
redirectPort="8443"
useBodyEncodingForURI="true" />
eike
On 10.05.2010 15:27, Matthias Keller wrote:
Hi
I'm using an autocompletefield and it works fine so far. Except that
when entering special characters, they don't get encoded correctly.
The query String is correct and sends the special character in
encoded UTF-8:
GET http://localhost:9080/.../...&q=%C3%B6&random=...
%C3%B6 is UTF8 for "ö"
But in:
org.apache.wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteBehavior.respond(AjaxRequestTarget)
The following line
final String val = requestCycle.getRequest().getParameter("q");
returns an incorrect string: "ö" which would be the %C3%B6 in
ISO-8859-1 (which happens to be my platform encoding)...
Thus the input parameter to my getChoices() call contains strange
characters in this case...
It appears that the request isn't read out as UTF-8 somehow.. Since I
don't know the AJAX internals, it's hard to find the culprit for me
I'm using Wicket 1.4.8
Matt
--
dipl. inform jens zastrow
phone | +49.152.04840108
mail | [email protected]
web | http://jens-zastrow.de
xing | http://www.xing.com/profile/Jens_Zastrow
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]