struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt Koppany" <zkoppanyl...@intland.com>
Subject RE: Working with UTF-8 and problems with German Umlauts
Date Wed, 05 Nov 2003 08:15:27 GMT
My problem was really, that my code was too late. After using a servlet
filter and calling request.setCharacterEncoding("UTF8") from the filter, my
problem was fixed.

Thank you everybody for the help.

Zsolt

> -----Original Message-----
> From: Jim Theodoridis [mailto:struts@tera.gr]
> Sent: Tuesday, November 04, 2003 5:18 PM
> To: Struts Users Mailing List
> Subject: Re: Working with UTF-8 and problems with German Umlauts
>
>
> I had the same problem in Greeks
> The first steep is to follow the instructions below
>
> http://www.anassina.com/struts/i18n
>
> ( If the page dos not displays tell me to send u via email )
>
> The second step, if u use a database, to retrieve data to work on UTF-8
> so database driver must support it.
>
> for mySQL below 4.x use
>
> String dbURL =
> "jdbc:mysql://localhost/YellowPages?useUnicode=true&characterEncod
> ing=UTF-8"
> ;
>
> i hope to help u
>
> ----- Original Message -----
> From: "Adam Hardy" <ahardy.struts@cyberspaceroad.com>
> To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Sent: Tuesday, November 04, 2003 12:31 AM
> Subject: Re: Working with UTF-8 and problems with German Umlauts
>
>
> > On 11/03/2003 09:43 PM Zsolt Koppany wrote:
> > > I have problems with German Umlauts when I enter the code below to my
> jsp
> > > pages. The problem is when I for example I forget to fill a required
> field
> > > and the previous values are restored after validation.
> > >
> > > How can I fix that?
> > >
> > > I use tomcat-4.1.24 with struts-1.1.
> > >
> > >
> > > <%@ page contentType="text/html; charset=UTF-8" %>
> > >
> > > <%request.setCharacterEncoding("UTF8");%>
> >
> > Hi Zsolt,
> > you are setting your character encoding way too late in the game. By the
> > point you set it in the JSP as you show above, Struts has already read
> > the request parameters into your form.
> >
> > A common method of setting the character encoding for struts is using a
> > filter, so the request is character-encoded before struts gets
> to see it.
> >
> > Adam
> >
> >
> > --
> > struts 1.1 + tomcat 5.0.12 + java 1.4.2
> > Linux 2.4.20 RH9
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>



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


Mime
View raw message