SQLite3 and Unicode Strings - Problem
SQLite3 and Unicode Strings - Problem
- Subject: SQLite3 and Unicode Strings - Problem
- From: Тимофей Даньшин <email@hidden>
- Date: Tue, 7 Apr 2009 14:18:17 +0400
Hello.
In my application, I have the need to store strings with non-latin
characters in a SQLite database.
But when I insert them, they become corrupt.
When i bind the string to the prepared statement, i do make sure it is
in UTF-8:
sqlite3_bind_text(sentence_insert_statement, 1, [string UTF8String],
-1, SQLITE_TRANSIENT); //Where "string" is the string i am trying to
insert.
I thought that might be the problem of SQLite itself, but when I make
an sql file in the UTF-8 encoding, like 'insert into sentences
(sentence) values ("привет");' and perform .read (the name of my
sql file), it works absolutely fine.
Am I missing something important when inserting strings to my db
programmatically?
I really hope you can help.
Thank you in advance,
Timofey._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden