At this moment I am creating a small Android app, as a hobby. It is not something serious: it makes a query from an sqlite database, and displays the results in a listview element. If you click on an item in the list, it makes another query with the content of the element, and displays the new results. (e.g. You tap on a city, it displays the restaurants in the city. If you tap on the city, it displays the foods available)
Now my problem is that most of these texts contain some special characters (like Ľ - u013D) that are not displayed correctly. And since they are not displayed correctly, I am unable to make further queries with them also. I have tried many ways, mainly what I saw on this forum, however I am too noob for that unfortunately. This is what I have:
//DataBaseHandler is just a custom class creating and executing SQL queries, nothing special. It extends to SQLiteOpenHelper
DataBaseHandler db=new DataBaseHandler(this);
//getStations returns a List<String> object with the required items, contains raw strings
ArrayList<String> StationList=(ArrayList<String>) db.getStations(i.getStringExtra("jaratszam"));
db.close();
lv=(ListView) findViewById(R.id.listStation);
ArrayAdapter<String> aa=new ArrayAdapter<String>(this, R.layout.tv, StationList);
lv.setAdapter(aa);
I have tried to modify the strings I got back with Html.fromHtml, also CharSequence[], but none helped (I guess i did not use them correctly). I have modified my database also, I have changed the special characters to html codes, like
�E1;
Could you please enlighten me what should I do exactly?
Thanks in advance.