My C++/Win32/Unicode program uses the ADO / MSDASQL / MyODBC chain to write data to MySQL.
The problem is that strings are converted to latin1 before arriving to MySQL, which expects UTF8. Accented characters are therefore rejected as being invalid characters.
My program passes OLE strings (UFT16-encoded) to ADO but somehow the MyODBC (MySQL ODBC driver) receives latin1 strings (I've recompiled MyODBC from the source code to check what comes in the driver through the SqlBindParameter ODBC function).
I've tried with both the ANSI and Unicode version of the MyODBC 5.3 driver. Also, all 'char%' and 'collation%' variables of MySQL say 'utf8'. MyODBC charset is configured as utf8.
How come ADO and/or MSDASQL turns my string to latin1?
TIA.