yazwas
5th April 2011, 11:27
Good day
I have a sqlite table that has a simplified Chinese column, and I want to preview that table in QSqlTableModel
I was able to print Chinese characters to the label using the following code
QTextCodec::setCodecForCStrings(QTextCodec::codecF orName("GB2312"));
QString a= "T氓颅鈥斆ヂ嘎";
ui->label->setText(a);
and it shows OK, so I think the issue is when reading from the db. I've tried SQLite administrator tool and it shows the table with the Chinese entries OK
What do you think a solution to this issue is?
Thanks!
I have a sqlite table that has a simplified Chinese column, and I want to preview that table in QSqlTableModel
I was able to print Chinese characters to the label using the following code
QTextCodec::setCodecForCStrings(QTextCodec::codecF orName("GB2312"));
QString a= "T氓颅鈥斆ヂ嘎";
ui->label->setText(a);
and it shows OK, so I think the issue is when reading from the db. I've tried SQLite administrator tool and it shows the table with the Chinese entries OK
What do you think a solution to this issue is?
Thanks!