Re: Problem with Java/MySQL and swedish characters
Posted by: Mark Matthews
Date: August 23, 2005 01:44PM

Anders Ericsson wrote:
> Checking my MySQL query log I have an entry:
>
> character_set_results = NULL
>
> Should not this say different? like
> character_set_results=latin1?

Anders,

Nope. That's correct. It means return the results in whatever character set they happen to be in. The JDBC driver can handle this.

How are you getting the query into Statement.executeQuery()? Are you sure you don't have some misconfiguration of your application/terminal/webserver, etc?

Java is unicode all of the time, so if you have a misconfiguration, it will show up as a transcoding error. C programs such as "mysql" on the other hand are a little bit more forgiving, in that bytes[] are bytes[], and they generally don't care what's in those bytes[] as long as it isn't a \0.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote




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.