Hi!
Nikola Milutinovic wrote:
>>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
>
I'm sorry, butr you are wrong. You can convert between numerous
encodings, but you have to have i18n.jar in your classpath.
>
>>- default_character_set=latin2 in my.cnf
>>
>
> Is there a way to set defaul character encoding for Tomcat? Setting LOCALLE on Unix?
>
Hmm, I wouldn't know.... Sorry.
>
>>- 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.
>
Have you tried putting %@page contentType="text/html;
charset=iso8859-2"%> on top of your JSP's ?
> Any help?
>
> Nix.
>
Best regards,
Kovi
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>