3 messages in com.mysql.lists.javaRe: JDBC and unicode characters
FromSent OnAttachments
ian Stanton14 Oct 2006 09:34 
Martin MC Brown16 Oct 2006 02:46 
Ian Stanton (Anywhere)19 Oct 2006 01:15 
Subject:Re: JDBC and unicode characters
From:Martin MC Brown (mc@mysql.com)
Date:10/16/2006 02:46:38 AM
List:com.mysql.lists.java

Hi Ian,

I'm having problems getting unicode characters from my MySQL database into my Java program. I'm using the Connector/J driver and MySQL 5. ... I have compiled the Java program with the utf8 character set flag but this doesn't help. I don' t think the problem relates to Java since I can get normal Java programs that don't connect to a database to output unicode characters without issue. It's either a MySQL characterset setting or a Connector/J setting.

Character set encoding is set automatically by Connector/J based on the character set encoding of the server (the value of the character_set (pre 4.1.0) and character_set_server (4.1.0 and newer).

You can override the automatic determination by using the characterEncoding property to the connect string.

There's more information in the manual here: http://dev.mysql.com/doc/ refman/5.1/en/connector-j-reference-charsets.html

MC