I'll give that a try, 
thanks art

 

List:       sqlite-users
Subject:    Re: [sqlite] mbcs vs char
From:       Dennis Cote <dennis.cote () gmail ! com>
Date:       2006-05-01 14:52:06
Message-ID: 44562096.2000300 () gmail ! com
[Download message RAW]

Art wrote:

> since there is no sqlite_exec16 call, does the sqlite_open16 force all data 
> to be \
> sent back as mbcs?  if so, why am i getting pointers with data in char* 
> format vs \
> wchar_t format?    when doing sqlite_exec("select * from user_data;") calls 
> 
Art,

I'm sorry, I didn't read your message carefully enough. I see you are 
using the sqlite3_exec() API to execute your queries. This is also a 
legacy API held over from earlier versions of SQLite for backward 
compatibility. It also always passes the result strings back to the 
callback function in UTF-8 format since it uses sqlite3_column_text() 
internally to build the array of results it passes back to the callback 
function. The documentation at 
http://www.sqlite.org/capi3ref.html#sqlite3_exec doesn't define the type 
of the callback function, but it is defined in sqlite.h as

  typedef int (*sqlite3_callback)(void*,int,char**, char**);

I would suggest that you switch to the new 
sqlite3_prepare()/sqlite3_step(), sqlite3_finalize() API set to execute 
your queries. Then you can use the sqlite3_column_text16() API to get 
your results encoded as UTF-16.

HTH
Dennis Cote


Thank you, 

Art Zerger
 
[EMAIL PROTECTED]
 


                
---------------------------------
Get amazing travel prices for air and hotel in one click on Yahoo! FareChase 

Reply via email to