Thanks all
its solved using the following line
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("CP1256") );
To copy to clipboard, switch view to plain text mode
and then, I use the same code as before
query.prepare("INSERT INTO stock (name, num) VALUES (:name, 10)" );
query.bindValue(":name", name);
query.exec();
QString name ="يزن";
query.prepare("INSERT INTO stock (name, num) VALUES (:name, 10)" );
query.bindValue(":name", name);
query.exec();
To copy to clipboard, switch view to plain text mode
and the value is saved as يزن and retrieved as يزن
Thanks again
Bookmarks