Bug #2081 Character corruption
Submitted: 10 Dec 2003 10:46 Modified: 10 Dec 2003 11:40
Reporter: Andrew Spong Email Updates:
Status: Closed Impact on me:
Category:Connector / J Severity:S2 (Serious)
Version:3.23.52 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[10 Dec 2003 10:46] Andrew Spong
The £ character when it is inserted into a text column using the jdbc driver, is corrupted when it is retrieved using rs.getString()

How to repeat:
When the "£" (pound) character is saved into a text type field (invoice.comments) using the jdbc driver version mysql-connector-java-2.0.14-bin.jar
, it saves successfully. 

However, when it is retrieved 
using rs.getString("invoice.comments") it is corrupted into e.g �
[10 Dec 2003 11:40] Mark Matthews
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
[10 Dec 2003 11:41] Mark Matthews
This has been fixed for over a year in Connector/J 3.0.x.

In Connector/J 2.0.14 and earlier, the default character set was 'ascii'. You need to add 'useUnicode=true&characterEncoding=ISO8859_1' to your JDBC URL if you want to use what MySQL calls 'latin1'.