Igor Tandetnik wrote: > On 1/6/2013 7:10 PM, Walter wrote: >> sqlite3_prepare16_v2 (vMdb, ws.c_str (), ws.size (), &stmt, &tail); > > The third parameter of sqlite3_prepare16_v2 is the length of the string > *in bytes*, not in characters. You are effectively passing only half the > statement.
Besides, *second* parameters of sqlite3_prepare16_v2 should point to *utf-16* string, but ws.c_str() returns pointer to zero-terminated *wchar_t* string. And wchar_t is *platform-dependent* type (and on lot of platforms it is *32-bit* integer type [usually in ucs-32 encoding, but, again, this may vary]). If you want to use sqlite3*16* api, you must convert strings to native-endian utf-16 encoding (with iconv or something) first. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users