Character Set and group_concat

Debra Bartling <[email protected]>
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
I recently upgraded to MySQL 4.1.19 and 
Connector/J 3.1.12 and have this problem: When I 
retrieve data stored in latin1 character set 
using group_concat with the JDBC driver, the data 
is not correct: I get M?ller instead of Müller. 
(A database query without group_concat retrieves 
the data correctly, as does the same group_concat query at the mysql prompt.)

Example:

create table t1 (
id1 integer auto_increment primary key,
full_name varchar(32) not null);

create table t2 (
id2 integer not null,
id1 integer not null,
sequence integer not null);

insert into t1 (id1, full_name) values (1, 'Müller, Günter');
insert into t1 (id1, full_name) values (2, 'Doe, John');

insert into t2 (id2, id1, sequence) values (1, 1, 1), (1, 2, 2);

select * from t1;
RESULT (command line or Java program):
1       Müller, Günter
2       Doe, John

select group_concat(full_name order by sequence separator '; ') as tlist
from t1 join t2 using(id1)
group by t2.id2;

RESULT (command line):
Müller, Günter; Doe, John

RESULT (Java program):
M?ller, G?nter; Doe, John

My settings are:
character_set_client = latin1
character_set_connection = latin1
character_set_database = latin1
character_set_results = latin1
character_set_server = latin1
character_set_system = utf8

Is there some other setting that I need to change 
in the JDBC driver and where do I set it? Thanks.

Debra Bartling
Earthquake Engineering Research Center
University of California, Berkeley


-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.