I try to read text file (file.txt) from SDcard and make string for Textview. so i found this and every things works fine but when i changed language in text file , result is some question marks and not words .how can i fix this problem?
Asked
Active
Viewed 25 times
0
-
could an InputStream reader with the encoding overload constructor help? https://developer.android.com/reference/java/io/InputStreamReader.html#InputStreamReader(java.io.InputStream, java.lang.String) there is also a nice example here: https://www.mkyong.com/java/how-to-read-utf-8-encoded-data-from-a-file-java/ – 10101010 Oct 19 '17 at 21:54
1 Answers
0
I had this problem too. this error fixed when you saved your .txt file as UTF-8 Unicode, not ANSI.

Hamed Taheri
- 164
- 2
- 11