Do not embed Turkish character Window 8 application to Sqlite

I am working with a Sqlite database in a Windows 8 application. (Sqlite for Windows Runtime)
There is a problem with the Turkish character when pasting into the database.
How can I fix this problem. Could you help me?
Thank you very much. Easy to come.

using (var db = new SQLite.SQLiteConnection(App.DbPath)) db.Execute("Insert Into Stock (Name) Values('ŞşİıĞğ')"); 

I try this, but the result → ÞþÝýÐð

 string a = "ŞşİıĞğ"; string b = string.Empty; byte[] utf8Bytes = Encoding.UTF8.GetBytes(a); b= Encoding.UTF8.GetString(utf8Bytes, 0, utf8Bytes.Length); using (var db = new SQLite.SQLiteConnection(App.DbPath)) db.Execute("Insert Into Stock (Name) Values('"+ b +"')"); 
+4
source share
1 answer

Most likely the problem is that your column cannot handle UTF-16 (unicode) correctly (there may be a client API). The safest bet is to convert to / from utf-8 on the client side and then read / write to the database.

System.Encoding.UTF8 has all the magic.

+3
source

All Articles