cevou
26th September 2009, 22:18
Hi everyone,
I have a problem with selecting German umlauts (ä ö ü) from an SQLite-Database.
There is one thing that works an another that doesn't.
Here the working example:
QSqlQuery query;
query.prepare("SELECT name, surname FROM names WHERE nameid=?");
...
This return for example "Max" and "Müller".
BUT if I want to select it in one combined string like this it returns some strange characters.
QSqlQuery query;
query.prepare("SELECT name || ' ' || surname FROM names WHERE nameid=?");
...
In my case this returns "Max M?ller". It's the same dataset just a differen SELECT. What am I doing wrong?
Thanks in advance
Chris
I have a problem with selecting German umlauts (ä ö ü) from an SQLite-Database.
There is one thing that works an another that doesn't.
Here the working example:
QSqlQuery query;
query.prepare("SELECT name, surname FROM names WHERE nameid=?");
...
This return for example "Max" and "Müller".
BUT if I want to select it in one combined string like this it returns some strange characters.
QSqlQuery query;
query.prepare("SELECT name || ' ' || surname FROM names WHERE nameid=?");
...
In my case this returns "Max M?ller". It's the same dataset just a differen SELECT. What am I doing wrong?
Thanks in advance
Chris