[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - forms and input elements UTF-8 encoding problem
xhemjl
do-not-reply at jboss.com
Wed Mar 7 06:13:14 EST 2007
Hi all,
I have my page in UTF-8, all polish characters are displayed correctly,
the response headers are:
Server: Apache-Coyote/1.1
| X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5
| Content-Type: text/html;charset=UTF-8
I have form with input text field when I enter, for example my polish
first name - ?ukasz the "?" is represented as '??'
// debug inside my doPost()
| for (String key: parameters.keySet()) {
| System.out.println(key + " = " + parameters.get(key)[0]);
| }
the following code with String(bytes, encoding) also does not work:
for (String key: parameters.keySet()) {
| try {
| System.out.println(key + " = " + new String(parameters.get(key)[0].getBytes(), "UTF-8"));
| } catch (UnsupportedEncodingException e) {
| throw new RuntimeException(e);
| }
| }
how can I decode parameters and represent them in UTF-8?
thanks in advance for any hints
best regards ?ukasz
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025740#4025740
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025740
More information about the jboss-user
mailing list