Re: characterEncoding has no effect in connection url
Ronald Boettcher <[email protected]> Fri, 10 Aug 2007 11:45:09 +0200
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Organization | Bauer Systems KG |
| Message-ID | <[email protected]> |
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/[email protected]