c# - not insert Turkish character Window 8 app to Sqlite -


i have been working sqlite database on windows 8 app.(sqlite windows runtime)
turkish character problem when insert database.
how can fix problem. can me?
thank much.
easy come.

using (var db = new sqlite.sqliteconnection(app.dbpath))     db.execute("insert stock (name) values('ŞşİıĞğ')"); 

i try result -> ÞþÝýÐð

string = "ŞşİıĞğ";     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 stock (name) values('"+ b +"')"); 

most problem column cannot handle utf-16 (unicode) (could client api). safest bet convert to/from utf-8 on client side read/write database.

system.encoding.utf8 has magic.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -