Razmehr
New Member
I'm very new to android studio so forgive me in advance if my question is not smart. I'm trying to create a dictionary (Pahlavi language to English). When I run the app it works almost perfectly, the only issue is that I'm not able to search for some of Pahlavi alphabet e.g (ā, č, ē) it only works with the standard English alphabet. What should I change in raw query so that my app would be able to search for non English characters as well? Could you please be so kind to help me with this issue?
My sqlite consists out of 3 tables.I created these two tables: words and history. the history table will keep track of the searched words by user and shows them on screen. The Word table has 6 columns: id (integer), pah_word (text), eng_definition (text), synonyms (text), antonyms (text) and examples (text). the pah_word contains Phalvai words with special characters. this is
my search query:
My sqlite consists out of 3 tables.I created these two tables: words and history. the history table will keep track of the searched words by user and shows them on screen. The Word table has 6 columns: id (integer), pah_word (text), eng_definition (text), synonyms (text), antonyms (text) and examples (text). the pah_word contains Phalvai words with special characters. this is
my search query:
public Cursor getMeaning(String text)
{
Cursor c= myDataBase.rawQuery("SELECT eng_definition,example,synonyms,antonyms FROM words WHERE pah_word = ('"+text+"')",null);
return c;
}
public Cursor getSuggestions(String text)
{
Cursor c= myDataBase.rawQuery("SELECT _id, pah_word FROM words WHERE pah_word LIKE '"+text+"%' LIMIT 40",null);
return c;
}
public void insertHistory(String text)
{
myDataBase.execSQL("INSERT INTO history(word) VALUES(('"+text+"'))");
}
public Cursor getHistory()
{
Cursor c= myDataBase.rawQuery("select distinct word, en_definition from history h join words w on h.word==w.pah_word order by h._id desc",null);
return c;
}
public void deleteHistory()
{
myDataBase.execSQL("DELETE FROM history");
}`