Vaadin 7 URL Decode error

Hi, i have a Problem with request.getParameter.

I get the URL Parameters with this Code:

    	PK_layout PK = new PK_layout(request.getParameter("ABAS_User"), request.getParameter("ABAS_PositionsID"), request.getParameter("ABAS_Kundennummer"),request.getParameter("ABAS_Kunde"),

My URL is :

http://127.0.0.1:8080/ABAS-Produktkonfigurator?ABAS_User=467WM&ABAS_PositionsID=12345&ABAS_Kundennummer=10203&ABAS_Kunde=Übung

The Problem is, when i try to display the parameter ABAS_Kunde i get : Übung

Seems there is a bug in the decoder.

Can someone help me?

Doesn’t look like a problem to me… The value in the URL is URL-encoded. Assuming the encoding is correct, you’re getting the decoded value. You won’t have access to the original encoded value because the servlet container will decode it automagically…

Can’t help with the actual issue, but the problem here seems to be that %C3%9C should decode to Ü, not Ã.

Yes this is the Problem.

Did you
create a ticket
about this (with an example of how to reproduce the issue)?
Otherwise, I’m afraid the issue will be forgotten.

What encoding is used for GET parameters is server dependent. Jetty apparently uses UTF-8 by default (the test works fine in Jetty but “fails” in Tomcat in the described way)

http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q2:

Tomcat will use ISO-8859-1 as the default character encoding of the entire URL, including the query string (“GET parameters”).

There are two ways to specify how GET parameters are interpreted:

Set the URIEncoding attribute on the element in server.xml to something specific (e.g. URIEncoding=“UTF-8”).
Set the useBodyEncodingForURI attribute on the element in server.xml to true. This will cause the Connector to use the request body’s encoding for GET parameters.

Other servers than Tomcat may by default interpret GET parameters using a different encoding