struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Theodoridis" <str...@tera.gr>
Subject Re: Working with UTF-8 and problems with German Umlauts
Date Tue, 04 Nov 2003 16:18:07 GMT
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&characterEncoding=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


Mime
View raw message