Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 6

Qt-interest Archive, April 2008
Problem extracting special characters from DB


Message 1 in thread

Hello, I've a problem with Firebird database when I extract data with
QSqlDataBase, QSqlQuery, I don't have the right charcarters like : œ, ` ,
etc.

In the database these characters ara inserted fine, the problem when I
extarct the.

Does anyone have an idea or the solution for this  problem.

Many reguards, Mourad 

 


Message 2 in thread

Hi,

> In the database these characters ara inserted fine, the problem when I 

How are they inserted? Do you specify a character encoding? Some 
QSqlDatabase option such as ISC_DPB_LC_CTYPE?
http://doc.trolltech.com/4.3/qsqldatabase.html#setConnectOptions

> extarct the.

Most probably the Qt Interbase driver expects a different encoding than 
the encoding actually used by the database. I don't know whether 
Firebird exposes the encoding used by the database (in which case Qt 
should be able to detect the encoding and you should report this lack of 
detection as a bug) or you have to specify the encoding yourself (in 
which case try ISC_DPB_LC_CTYPE as explained above).

-- 
 [ signature omitted ]