Re: How to set central european encoding
Posted by: Mark Matthews
Date: May 07, 2005 02:48PM

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


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 Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools

Options: ReplyQuote

Written By
March 24, 2005 06:43AM
Re: How to set central european encoding
May 07, 2005 02:48PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.