I'm using Xamarin SQLite.NET PCL Package,also i got a DB with 1 million records.
Special for good performance,i chose a FTS engine. All going fine,but not with Cyrrilic encode.
Example,where i doing simple query:
"SELECT name FROM customers WHERE name MATCH '"+filter+"*' LIMIT 50";
Where filter is a string constant with a value(value depends what user will input from keyboard,it's like dynamic search).
SO the problem is that i get SQLite Exception when filter got a Cyrillic value:
SQLite.Net.SQLiteException: near " ": syntax error
At current moment i tried to make something like this(encode to UTF-8 my string query) :
string Query = String.Format("SELECT name FROM customer WHERE name MATCH '{0}*' LIMIT 50;",filter);
Encoding encod = Encoding.UTF8;
byte[] bts = encod.GetBytes(Query);
encod = Encoding.Unicode;
string Output = encod .GetString(bts, 0, bts.Length);
But result is same!
Any suggestions?What can i do?
PS Encode on my source DB is UTF8.
Aucun commentaire:
Enregistrer un commentaire