Hello.
I'm having some encoding problems when QT SQLite connection ( QSqlDatabase::addDatabase("QSQLITE") ) tries to read data from a SQLite archive.
I assign a field value from the database into a QString variable:
Qt Code:
QString str001; str001 = record.value("title").toString();To copy to clipboard, switch view to plain text mode
I assume that the field contains a UTF-16 encoding (SQLite3 documentation) and I assume that QT4 processes information as UTF-16 unless I use specific functions. And I'm triyng to compile my program under Windows XP SP3 that uses UCS-2 / UTF-16 for heir standard Unicode encoding.
But when field information displays on the screen I obtain the "?" code for non-standard chars like accentuated vowels or another specific symbols.
I have tried to display the information in a label, a text box, a list box, a table, ... But always is the same. If QT display standard QStrings (not from SQLite), the output is encoding correctly.
Is there any way of finding out what is getting lost in the conversion process? Something that warns about the incorrect codification (in the database, the driver, in my head, ...) or something like that.
Thanks.
Bookmarks