i got some problems with encoding too ... but there was problem when i
submit data from forms (page was in cp1250 submited data were iso-8859-?)
... when i submited and writed to DB characters was wrong ... solution was
to add filter which sets encoding of each request ...

more here ..
http://marc.theaimsgroup.com/?l=tomcat-user&m=100679292919360&w=2

feky

----- Original Message -----
From: "Nikola Milutinovic" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 05, 2001 2:19 PM
Subject: Re: Character Encoding problems 2


> > I have had similar problem with Cp1250 encoding(Tomcat and MySQL). You
> > have to have in mind this was not done on Tomcat 4.x, but 3.x.
> > This is what I have done:
> > - <%@page contentType="text/html; charset=windows-1250"%> on top of
> > every JSP file
>
> I don't think that is a correct character encoding as far as Java is
concerned. I think Java supports only ISO-8859-* and UTF-*. Please correct
me if I'm wrong
>
> > - default_character_set=latin2 in my.cnf
>
> Is there a way to set defaul character encoding for Tomcat? Setting
LOCALLE on Unix?
>
> > - created new database so it gets created in latin2 character set
>
> Done that with PostgreSQL.
>
> > - when I connected to MySQL I was using mm.mysql driver and the database
> > URL was
> >
jdbc:mysql://hostname:port/database?characterEncoding=Cp1250&useUnicode=true
>
> I've never used MySQL, just PostgreSQL. So, the database is ISO-8859-2 and
this converts it to CP-1250, which goes by as Latin-1, as far as Tomcat is
concerned.
>
> I have had a similar "success" with my setup: the database was Latin-1,
the data in it was win-1250 and when I forced JDBC connection to Latin-1
charset, it would pass through JSP. But that is such a hack...
>
> > Then all characters were correctly displayed on JSP pages.
>
> What I'm looking for is a "politically correct" solution. I have so far:
>
> - PostgreSQL with one Unicode and one ISO-8859-2 databases, both with the
same data in correct form.
> - JDBC driver which is acting OK.
> - JSP pages with correctly set pageEncoding
> - Java Servlet with correctly set contentType/encoding
>
> Still, Tomcat goes for default charset encoding and screwes up Latin-2
characters.
>
> Any help?
>
> Nix.
>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to