I have met some difficulty in getting parameter values from a unicoded url GET request.
The url itself contains scandinavia letters “Å” and it represents in url as “%C4”. But when I call ParameterHandler method in my application, it comes out that neither “Å” nor “%C4” is get then, instead, I got question marks in the field on the characters.
the http request looks like this:
…&B02K_CUSTNAME=MEIK%C4L%C4INEN+MAIJA&…
and I directly call function handleParameters in my application
public void handleParameters(Map<String, String[]> parameters) {
...
}
the value I inspected looks like: [MEIK??NEN MAIJA]
So I’m thinking a way to set decode scheme for the Vaadin application. if anyone know some solution about it.
(a) ‘C4’ is not the character you are looking for.
‘C4’ hex for decimal 196, which in Unicode is the character:
LATIN CAPITAL LETTER A WITH DIAERESIS
Looks like: Ä
Apparently you want C5 (197):
LATIN CAPITAL LETTER A WITH RING ABOVE
Looks like: Å
Tip: If you use Mac OS X, I highly recommend downloading the free app
UnicodeChecker to see a complete database of Unicode characters.
(b) I am not having any problem retrieving URL parameters containing U+00C4 & U+00C5 Uniccode characters.
I am using plain Java 6 and the Vaadin 6
ParameterHandler class running in Eclipse Indigo using it’s built-in web browser (WebKit based, as I understand it).
Here is a simple example app that dumps the URL parameter to the console. Simply copy-paste this code as a complete Vaadin 6.7.6 app.