Does not support Unicode

Jan 3, 2014 at 7:33 AM
For example:

This one does not work:

"update main set Subject='中文' where ROWID=1"

but this one works good:

"update main set Subject='English' where ROWID=1"
Coordinator
Jan 16, 2014 at 3:37 PM

You could try the following:

Directly after opening a connection to the new database, and before creating any tables, use the ExecuteStatementAsync method to execute the following statement:

PRAGMA encoding=”UTF-16”

That should establish UTF16 for your new database and cause the statement you describe to work.

Internally, our wrapper uses the sqlite_open_v2() method which defaults to UTF8 encoding, but you can change that using this pragma.

Andy

Jan 17, 2014 at 1:36 AM
andywigley wrote:
You could try the following: Directly after opening a connection to the new database, and before creating any tables, use the ExecuteStatementAsync method to execute the following statement: PRAGMA encoding=”UTF-16” That should establish UTF16 for your new database and cause the statement you describe to work. Internally, our wrapper uses the sqlite_open_v2() method which defaults to UTF8 encoding, but you can change that using this pragma. Andy
Thanks for your reply. I tried but not work.
Feb 10, 2014 at 6:25 AM
I solved it by modifying PlatformStringToCharArray function in Statement.cpp and Database.cpp files in this wrapper.

You need to change statement
int bufferSize = string->Length() + 1;

with
int bufferSize = string->Length() * 3;

It looks that bufferSize calculated is not enough to hold unicode data.