Problem with Greek (and other) characters
Date: October 29, 2009 05:14PM
Hi All
I have a database table with English and Greek data. I setup the schema to have collation utf8_general_ci and use character set utf-8. The data imported correctly in the table and it all looks correct when I browse the table via Toad for MySQL.
But when I use the J Connector and query the table via a Java app the returned greek characters come back as question marks. The Java program is very simple
String mysqlURL = "jdbc:mysql://10.0.0.65:3306/cm_products?useUnicode=true&characterEncoding=UTF-8";
Connection conn = null;
Statement ps = null;
try
{
conn = DriverManager.getConnection(mysqlURL, "demo", "password");
ps = conn.createStatement();
ResultSet rs = ps.executeQuery("select * from lov_protocol");
while (rs.next())
{
System.out.println(rs.getString("desc"));
}
Does anyone have clue what could be going on? Im using MySQL 5.1 and the J/Connector 5.1.10.
Thanks
Sorry, only registered users may post in this forum.
© 1995-2008 MySQL AB, 2008- Sun Microsystems, Inc.