Android Question search quwery

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:
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");
}`
my search query:
 

Attachments

  • Screen Shot 2021-07-10 at 1.31.45 AM.png
    Screen Shot 2021-07-10 at 1.31.45 AM.png
    342.1 KB · Views: 158
  • Screen Shot 2021-07-10 at 1.32.05 AM.png
    Screen Shot 2021-07-10 at 1.32.05 AM.png
    292.8 KB · Views: 159

kisoft

Well-Known Member
Licensed User
Longtime User
Hello ... My friend probably confused the forums ... This is the B4A forum - it's a completely different programming environment ...
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Hey Razmehr, if you do move this thread, can you please come back here and let me know where you are moving it to? I'm also using SQLite and taking an online class using Android Studio.
Thanks, SS
 
Last edited:
Upvote 0

Razmehr

New Member
Hey Razmehr, if you do move this thread, can you please come back here and let me know where you are moving it to? I'm also using SQLite and taking an online class using Android Studio.
Thanks, SS
Hello, Dear sir Sherlby, sure I will let you know.
 
Upvote 0

Razmehr

New Member
Hello ... My friend probably confused the forums ... This is the B4A forum - it's a completely different programming environment ...
I'm really sorry, I didn't know that. Could you be so kind to point me to the proper forum.
Thanks in advance.
 
Upvote 0
Top