kroenecker
28th March 2009, 16:59
I am working with a sqlite table with Japanese characters. The data appears to be just fine because I can use the sqlite command line utility to select entries and I can write QSqlQuery statements that pull data using the row id. However, when I try to construct queries that use Japanese characters to get data, nothing is returned.
For instance if I use the code below and value = わたし nothing is returned:
QString s = "SELECT * FROM edict_words WHERE reading = :reading ";
q.prepare(s);
q.bindValue(0, value);
q.exec();
I can replace "reading" with id and the bindValue "value" with a legitimate id number and my tableview will be populated with a nice row of data, showing proper Japanese characters. Otherwise, I can't seem to get anything from the table.
Any ideas?
For instance if I use the code below and value = わたし nothing is returned:
QString s = "SELECT * FROM edict_words WHERE reading = :reading ";
q.prepare(s);
q.bindValue(0, value);
q.exec();
I can replace "reading" with id and the bindValue "value" with a legitimate id number and my tableview will be populated with a nice row of data, showing proper Japanese characters. Otherwise, I can't seem to get anything from the table.
Any ideas?