0

I have a csv file of persian words. I want to read from it and show those words on android textview. Reading from file is ok but the problem is that it always shows diamonds with question mark on it for textview text. (When I put persian words inside string.xml file and bind them to textview, it works perfectly but I don't know what is the problem with reading them from some external files)

My android version is 4.1

HaMi
  • 539
  • 6
  • 23
  • I think the problem may be with the character encoding. csv does not include encoding information – Nadeem Iqbal Sep 07 '14 at 08:17
  • Look here, [its a similar csv issue with persian characters](http://www.dailyfreecode.com/forum/persian-characters-not-shown-correctly-20576.aspx) – Nadeem Iqbal Sep 07 '14 at 08:19
  • `Reading from file is ok`. No you do the reading wrong. You are not accounting for the character encoding. – greenapps Sep 07 '14 at 09:22
  • @NadeemIqbal: You are right, the problem was with encoding. I set an encoding for csv file but it dosen't change anything. So I transfer my data into an text file with utf8 encoding. Is there a way to set an encoding for csv file? – HaMi Sep 07 '14 at 13:36
  • @greenapps: Thanks, please take a look at previous comment – HaMi Sep 07 '14 at 13:37

0 Answers0