Sqlite For Windows Store Doesn't Search For Arabic Text
I am using sqlite for my windows 8 store app. I've been querying a lot of things successfully, but recently i tried to do the following query: SELECT * FROM QuranText where AyaWit
Solution 1:
EDITED
I tested your query and it worked locally for me. What is your encoding type?
You can query your encoding type with this command:
PRAGMA encoding;
It should be UTF-8. If it isn't, you can update the encoding with this command:
PRAGMA encoding = "UTF-8";
Solution 2:
After a lot of trials, we came to the solution to this. Apparently the SQLlite layer over the SQL database only recognize Arabic letters when it's entered in a parameterized query style like this:
//define your connection here
static SQLite.SQLiteConnection dbConn = = new SQLite.SQLiteConnection(file.Path);
//in your method that makes the call:
string text="الم";
dbConn.Query<DB.QuranText>(@"SELECT * FROM QuranText where AyaWithoutTashkeel LIKE", "%" + text + "%");
This is the only way that worked.
Post a Comment for "Sqlite For Windows Store Doesn't Search For Arabic Text"