Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: characterEncoding has no effect in connection url

From: Ronald Boettcher <rboettcher(at)hbv.de>
Date: Fri Aug 10 2007 - 05:45:09 EDT


Gu Lei(Tech) wrote:
> I also tried useUnicode=true. It's the same.
>
>

I would try to write to a File instead of System.out. And then look in the file with an UTF8 capable editor. When it is okay, then the System.out implictly converts your utf8 to another code.

For instance:
FileOutputStream fos = new FileOutputStream(args[0]); OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");

When the content of the file is not okay, try to write a UTF8 string into the database before you process a SELECT on the same data and write it to file (or even System.out).
If this method results in correct data, then your data in the MySQL DB is not correct UTF-8. And you have to adjust the database engine or the (other?) program which you used to import the data into the DB.

Ronald

-- 
MySQL Java Mailing List
For list archives: 
http://lists.mysql.com/java
To unsubscribe:    
http://lists.mysql.com/java?unsub=lists@pantek.com
Received on Fri Aug 10 05:45:20 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:14:14 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library