PDA

View Full Version : Charset: latin1 in MySQL Why?



Mauricio
5th June 2014, 02:58
Hi everyone

I have a problem with a mysql connection, in my code:


if(QSqlDatabase::isDriverAvailable("QMYSQL")){
QSqlDatabase myDB = QSqlDatabase::addDatabase("QMYSQL");
myDB.setHostName(S);
myDB.setUserName(U);
myDB.setPassword(P);

Whe I try to connect, I use Wireshark and I see that:

10393

How I can change this? I wanna use UTF8 but I don't know how do this.

Please, anybody can help me?


Regards.

ChrisW67
7th June 2014, 09:37
Take a look at the [client] section in your my.cnf file for a "default-character-set=utf8" entry. Where that config lives is dependent on your environment (and there are several places the client might look).