tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kun Niu" <haoniu...@gmail.com>
Subject Re: Problem about posting Chinese characters to tomcat server.
Date Mon, 02 Jul 2007 15:18:59 GMT
Thank you for your excellent link.
But what makes me feel strange is that how can I add the code
String paramEncoding = application.getInitParameter("PARAMETER_ENCODING");
request.setCharacterEncoding(paramEncoding);
into my JSP file.
And now to my JSP file, I turn to the fmt namespace.
I added <fmt:requestEncoding value="UTF-8" /> to my JSP webpage.
And it finally works for me. :)
Thanks again.

2007/7/2, Johnny Kewl <john@kewlstuff.co.za>:
> Best article I have found so far on this subject, is this one....
> It seems that POST is more difficult than GET....
> http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/
>
> good luck...
>
> ----- Original Message -----
> From: "Niu Kun" <haoniukun@gmail.com>
> To: <users@tomcat.apache.org>
> Sent: Sunday, July 01, 2007 4:16 PM
> Subject: Problem about posting Chinese characters to tomcat server.
>
>
> > Dear all,
> >
> > I've just got a simple form to post Chinese characters to my jsp file.
> > But the data submitted can't be seen on my web browser.
> > After analyzing the data posted and shown on my browser, I find the
> > following problem.
> >
> > The letters I submit are "e7 89 9b e5 9d a4" which are in UTF-8 form.
> > And the letters catched on the return webpage are
> > "c3 a7 c2 89 c2 9b c3 a5 c2 9d c2 a4".
> > We can see that each single character is doubled.
> > Each one is first prefixed with "c3" and then two "c2".
> > It's true that I add URIEncoding="UTF-8" to my connector's parameter list.
> > And all my files are encoded as "UTF-8" format.
> >
> > My tomcat version is 5.5.
> > My jdk is 1.5.
> > And my os is Debian lenny.
> >
> > Any help would be appreciated and thanks in advance.
> >
> > Regards
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
失业
         牛坤
MSN:haoniukun@hotmail.com
Mime
View raw message