> Don't use sqlite3_exec. Use sqlite3_prepare16 (which accepts wchar_t*), 
> sqlite3_step, sqlite3_finalize. Read text from columns with 
> sqlite3_column_text16 (which returns wchar_t*).

I'd say it's not exactly this way. AFAIK, wchar_t on Linux is
32-bit, but sqlite3_column_text16 will return 16-bit characters. And
that will be UTF-16 string. For OP it will make any difference only if
he wants to feed the received string to some function accepting real
wchar_t*. Some conversion will be necessary.


Pavel


On Thu, Aug 11, 2011 at 8:04 AM, Igor Tandetnik <itandet...@mvps.org> wrote:
> NOCaut <per...@mail.ru> wrote:
>> I now how work with sqlite guys
>>
>> my problem: in  const char *  and i wont wchar_t*. becouse wchar_t* -
>> unicode type understand
>>
>> int sqlite3_exec(
>>  sqlite3*,                     /* An open database */
>>  const char *sql,              /* SQL to be executed */
>>  sqlite3_callback,             /* Callback function */
>>  void *,                       /* 1st argument to callback function */
>>  char **errmsg                 /* Error msg written here */
>> );
>
> Don't use sqlite3_exec. Use sqlite3_prepare16 (which accepts wchar_t*), 
> sqlite3_step, sqlite3_finalize. Read text from columns with 
> sqlite3_column_text16 (which returns wchar_t*).
> --
> Igor Tandetnik
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to