This page has moved or been replaced. The new page is located here:

Please update any bookmarks that point to the old page.

Download this Manual
User Comments
  Posted by Ben Iggulden on September 8, 2006
I had been having trouble getting JDBC connections to use the useUnicode and characterEncoding parameters using a JDBC URL like this:


My problem turned out to be that I was using MySQL Connector/J version 3.1.11. When I migrated to 3.1.13 the approach described here worked.
  Posted by Mohammed Saleem on December 30, 2009
I had troubles with the UTF-8, too. sending UTF-8 characters into the database is fine, but when retrieving them, the JDBC driver doesn't encode them properly into the String Object, so I did a workaround and it worked with me:

String message = new String( rs.getBytes("message"), "UTF-8");

the message column is actually a varchar, anyway, it is working fine with me, but I am still not sure of it is the right way to do it
  Posted by Patrick Bertsch on July 3, 2010
The Workaround with the getBytes Method works like a charme.

Thank you so much.
Sign Up Login You must be logged in to post a comment.