Hello everybody, I've written a Qt program which migrate data from an Interbase database to a MySQL database.
It works fine but I've a problem with frensh characters like (é, è, à , etc).
Those charcaters are fine in the interbase database, but after executing the select request to have data and I display the data I've selected those characters are displayed as " ? ".
This my connection function
Qt Code:
  1. QSqlDatabase db = QSqlDatabase::addDatabase(driver, name);
  2. db.setHostName(host);
  3. db.setDatabaseName(path);
  4. db.setUserName(user);
  5. db.setPassword(pwd);
  6. if(driver == "IBASE")
  7. db.setConnectOptions("ISC_DPB_LC_CTYPE = LATIN1");
  8.  
  9. if(!db.open())
  10. {
  11. qCritical() << "Erreur Ouverture base de données : " << db.lastError().text();
  12. return false;
  13. }
  14. return true;
To copy to clipboard, switch view to plain text mode 
.
Can anyone tel me where I'm wrong and how to do resolve this problem.
Knowing that I've tried to user QTextCodec like
Qt Code:
  1. QTextCodec *codec = QTextCodec::codecForName("LATIN1");
  2. qDebug() << codec->toUnicode(q1.value(1).toByteArray());
To copy to clipboard, switch view to plain text mode 
but I've always the same result " ? ".
Many thanks in advance.
Best Regurads.