Tom Pop wrote:
> Hello, please, I have this problem:
>
> MySQL 4.1.10
> Connector/J 3.1.7
>
> I have SQL dump in ISO-8859-2 encoding, I have
> these variables in MySQL:
> character_set_database latin2
>
> I use this URL to connect to the database:
> jdbc:mysql://localhost/dbName?useUnicode=true&
> characterEncoding=ISO8859_2
>
> But central european specific characters displays
> like '?'. When I use my application and edit the
> text, it's stored to DB correctly and displays
> correctly too, but I don't want to rewrite all my
> database content :-)
>
> I worked fine with MySQL 4.0 and URL:
> jdbc:mysql://localhost/dbName?useUnicode=true&
> characterEncoding=ISO-8859-2
>
> Please, what should I do to fix the problem?
> Thanks.
>
> Tom
Tom,
It would be better if you configure the database server to use the _specific_ character set you have in mind. ISO8859_2 maps to at least 4 character sets on the server, not all of them compatible. The JDBC driver will pick "latin2" by default, but perhaps you wanted czech, hungarian or croat?
-Mark
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html