Re: AutoCompleteTextField uses wrong encoding?

2010-05-14 Thread Eike

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 the ajax requests correctly encoded 
(using utf8).







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




Re: AutoCompleteTextField uses wrong encoding?

2010-05-12 Thread Jens Zastrow

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.









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  | m...@jens-zastrow.de
web   | http://jens-zastrow.de
xing  | http://www.xing.com/profile/Jens_Zastrow


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AutoCompleteTextField uses wrong encoding?

2010-05-10 Thread 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.









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




AutoCompleteTextField uses wrong encoding?

2010-05-10 Thread Matthias Keller

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




smime.p7s
Description: S/MIME Cryptographic Signature