struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emilia Ipate" <eip...@nl.swets.com>
Subject RE: [S2] Chinese encoding problem
Date Wed, 27 Jun 2007 11:35:30 GMT
There is no interceptor, from what I know.

You should try to found where exactly lies the problem:
- is struts doing something wrong or the request got from the client is
already bad. You can check that by looking in the HttpRequest object, in
the debug mode


Emilia
-----Original Message-----
From: Vincent Lin [mailto:vincent.lin.18@gmail.com] 
Sent: Wednesday, June 27, 2007 1:30 PM
To: Struts Users Mailing List
Subject: Re: [S2] Chinese encoding problem

Emilia,

I've tried -Dclient.encoding.override=UTF-8, it doesn't seem to change
anything.

It's really wired that when I use IE, the Chinese characters will be
scramble.
But when I use firefox, it works correctly.

The funny thing is that the browser language setting of my IE is "zh_TW"
while the setting in firefox is "en".

Is there any interceptor in S2 changing the encoding of request?

On 6/27/07, Emilia Ipate <eipate@nl.swets.com> wrote:
>
> Vincent,
> Your server must have as a Java VM Argument this line:
>   -Dclient.encoding.override=UTF-8
>
> (search on google client.encoding.override and you will find more)
> Emilia
>
>
>
>
>
> -----Original Message-----
> From: Vincent Lin [mailto:vincent.lin.18@gmail.com]
> Sent: Wednesday, June 27, 2007 12:56 PM
> To: Struts Users Mailing List
> Subject: Re: [S2] Chinese encoding problem
>
> By the way the settings in my JSP:
>
> <%@ page contentType="text/html; charset=UTF-8" %>
>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>
> Did I miss anything else?
>
> On 6/27/07, Vincent Lin <vincent.lin.18@gmail.com> wrote:
> >
> > Hi
> >
> > I'm having problem to submit Chinese characters from browser to web
> > server.
> >
> > I have the following  settings in struts.properties:
> >
> > struts.locale=zh_TW
> > struts.i18n.encoding=UT8
> >
> > But when I submit Chinese characters to web server.
> > It gets scrambled characters.
> > (The wierd thing is that sometimes the server gets correct Chinese
> > characters.)
> >
> > I've tried to use an interceptor to do
> req.setCharacterEncoding("UTF-8").
> > It doesn't work.
> >
> > I've tried to use Servlet Filter to do
> req.setCharacterEncoding("UTF-8")
> > too.
> > (It's the way we solve Chinese problem in struts 1 environment).
> > It still doesn't work.
> >
> > Does anyone know how to solve this problem?
> >
> > Thanks a lot!
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message