mardi 28 juillet 2015

Sqlite fts4 search html encoded character

I am coding a dictionary project. Its can translate english to arabic or arabic to english. Words are stored in sqlite fts4 database. Arabic letter in database stored html encoded like

غير

When i use fts4 query syntax in english to arabic for example => stor

SELECT * FROM fts_dic WHERE english MATCH '"^stor*"';

Returned results are good for me like

store
stored
storage

But when i search arabic to english for => غير

SELECT * FROM fts_dic WHERE english MATCH '"^غير*"';

Returned results

ظغير׾
֎׾غيرظ

But i want to see result only start with my searched html encoded text like

غيرخ
غيرٗ

I use "^" at the begining of the word to get this result as you see. In english to arabic works fine but arabic to english not working properly.

Aucun commentaire:

Enregistrer un commentaire