geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xh <xhsaymyn...@yahoo.co.uk>
Subject UTF-8 request strings corrupted
Date Mon, 09 Jul 2007 09:03:21 GMT
Hi All!

I have a problem with UTF-8 web pages encoding and Polish language.

Pages are generated from XML files with XSLT. All Polish characters are properly displayed.
Everything is OK.

Response is sent as:

Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=DCDE41C9E12D69A15B261649CF15DF8E; Path=/DataWeaver
Content-Type: text/html;charset=UTF-8
...

also, the generated XHTML resposne's <header> element consists:

<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<meta content="pl" http-equiv="Content-Language"/>

but...

when I fill Polish characters in web form and submit it, all Polish characters are corrupted...

for example, inserted records in database are displayed as strange strings

furthermore, when I extract parameters in this way:

Map<String,String[]> temp = (Map<String, String[]>)request.getParameterMap();
for (String s: temp.keySet()) {
      // output to the console
      // this will print every single Polish character as double '?'
      System.out.println(s + ": " + temp.get(s)[0]);
}

any idea how to extract UTF-8 encoded strings from request?

thanks in advance
best regards
Lukasz




		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
http://uk.security.yahoo.com
Mime
View raw message