Unsolved mysql_real_query MySQL C API
-
Hi all,
In my program I have this line:
QString queryToExecute("SELECT 'Día'"); mysql_real_query(dbConnection, queryToExecute.toUtf8().data(), queryToExecute.toUtf8().length());
And it works just fine on Linux and Linux, but in Windows the í char is no sent the correct way, I mean, the Database Server does not receive and í.
I have tried the QTextCodec class but it does not work.
¿Any other idea?
Best regards
David -
This is due to your locale on windows is something != utf-8
Tryauto queryToExecute(QString::fromUtf8(u"SELECT 'Día'"));