OK. But what I don't understand is: is this (lack of sqlite3_exec16) by design?

Yet another question on the library design. I've seen some projects
which provide a same interface for all supported encodings, e.g.

#ifdef _UNICODE
#define sqlite3_open sqlite3_open_utf16
#else
#define sqlite3_open sqlite3_open_ansi
#endif

#ifdef _UNICODE
#define strcpy _strcpy_w
#else
#define strcpy _strcpy_a
#endif

I'd like to know the design rationales on why sqlite chose to make
available the interfaces with different encodings simultaneously, and
have the users _explicit_ choose which to use.


2006/7/10, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
"Tzu-Chien Chiu" <[EMAIL PROTECTED]> wrote:
>
> Is it true: the only way the fetch the values of the fields in UTF-16
> is to write another version of sqlite3_exec() wrapping sqlite3_*16()
> functions?
>

You do not have to write a new sqlite3_exec16() from scratch.
You can make a copy of sqlite3_exec() and with a few simple
edits turn it into sqlite3_exec16().
--
D. Richard Hipp   <[EMAIL PROTECTED]>




--
Tzu-Chien Chiu - SMedia Technology Corp.
URL: http://www.csie.nctu.edu.tw/~jwchiu/

Reply via email to