Re: [sqlite] UTF16 - sqlite3_prepare16_v2

2010-05-22 Thread Black, Michael (IS)
HAR(50));", -1,&pStatement, 0); std::cout << sqlite3_errmsg(Database) << std::endl; sqlite3_step(pStatement); sqlite3_close(Database); return 0; } Michael D. Black Senior Scientist Northrop Grumman Mission Systems ____________ From: sqlite-users-boun

Re: [sqlite] UTF16 - sqlite3_prepare16_v2

2010-05-22 Thread shion
That was it. I didn't know that the wchar_t has different bit sizes on Linux and Windows. Thank you very much. Jay A. Kreibich-2 wrote: > >> I know that the SQL syntax is correct and it is possible to execute that >> source under windows. >> I don't understand why it doesn't work with Linux. >>

Re: [sqlite] UTF16 - sqlite3_prepare16_v2

2010-05-22 Thread shion
If i take a look at the declaration of sqlite3_prepare16_v2() it looks like this: SQLITE_API int sqlite3_prepare16_v2( sqlite3 *db,/* Database handle */ const void *zSql, /* SQL statement, UTF-16 encoded */ There is a UTF-16 encoded string needed. Black, Michael (IS) wrote

Re: [sqlite] UTF16 - sqlite3_prepare16_v2

2010-05-22 Thread Jay A. Kreibich
On Sat, May 22, 2010 at 09:23:06AM -0500, Black, Michael (IS) scratched on the wall: > I think you're making the mistake of thinking that the entire SQL > string is UTF-16. It is. That's the whole point of the "16" interfaces. > Look at the API for sqlite3_prepare16_v2 > SQLITE_API int sqlite

Re: [sqlite] UTF16 - sqlite3_prepare16_v2

2010-05-22 Thread Black, Michael (IS)
I think you're making the mistake of thinking that the entire SQL string is UTF-16. Look at the API for sqlite3_prepare16_v2 SQLITE_API int sqlite3_prepare16_v2( sqlite3 *db, /* Database handle. */ const void *zSql, /* UTF-8 encoded SQL statement. */ It's your data fiel

Re: [sqlite] UTF16 - sqlite3_prepare16_v2

2010-05-22 Thread Jay A. Kreibich
On Sat, May 22, 2010 at 05:27:24AM -0700, shion scratched on the wall: > > Hello, > > I already found a lot of threads about the UTF16 topic, but I couldn't solve > my problem. > I have the following source code: > > sqlite3_open_v2("test.sqlite", &Database, SQLITE_OPEN_READWRITE | > SQLITE_OPEN