Bug #45545 Bug with character encoding using mysql-connector-odbc-5.1.5
Submitted: 17 Jun 2009 2:19 Modified: 17 Jun 2009 9:20
Reporter: Eduardo Marturano Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:5.1.5 OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: Accent, character, ODBC, tilde, VB6

[17 Jun 2009 2:19] Eduardo Marturano
Description:
I'm from Brazil and we use special characters like accents ("õ", "é", "à") and "ç".
I had a problem using mysql-connector-odbc-5.1.5 to save data from Visual Basic 6 (VB6) to MySQL 5.1. All those special characters were changed.
I have tried to change to all kinds of encoding like Latin1 and UTF-8, but no success.

How to repeat:
Install mysql-connector-odbc-5.1.5

On VB6, save data on MySQL using a code like this:

"DRIVER={MySQL ODBC 5.1 Driver};SERVER=localhost;DATABASE=mydatabase;UID=root;PWD=password;"

Suggested fix:
Use older version of mysql-connector-odbc

I solved the problem by uninstalling mysql-connector-odbc-5.1.5 and using the previous version mysql-connector-odbc-3.51.27

On VB6, just changed the code to this:

"DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=mydatabase;UID=root;PWD=password;"

After that, all special characters were OK!
[17 Jun 2009 9:20] Tonci Grgin
Hi Eduardo and thanks for your report.

The fact that c/ODBC 3.51 works as you expect tells me you have problems in your database(s) and table(s) settings and not with c/ODBC 5.1.
Common case is that either some or all of the conditions are met, like c-set client/results/database/field expects latin-n chars and not UTF-8 stream.
Please recheck all of the above according to manual.