When running the code below the result is 'אבגדה' in Windows and '?????' on Linux, seems that
the qry.value(0)
(a QVarient type) using a defult coding. In Linux I'm using free.dts and odbc.ini in the driver level
How to set QSqlQuery so that the return format will be UTF16?
What is the returned format?
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
db.setDatabaseName("..."); //Some valid connection string
QByteArray ba;
char* _buffer11;
if(db.open())
{
QSqlQuery qry(db);
qry.prepare("Select UTF16 From DataTypes WHERE ID=9");
if(qry.exec())
{
QVariantList resultList;
while(qry.next())
{
resultList << qry.value(0);
}
}
// ...
}