0

I have a srt file (subtitle file) which im trying to read in android, opening the srt file on my pc with notepad++ shows gibrige text, but notepad++ has an option to read file as windows-1256 which fix this issue, I was wondering how can I do this in Android ? Also is there a way to automatically choose how to read the file in Android so it shows the actual letters no matter what language is written in the text ? I tried this code but it didn't help:

Reader r = new InputStreamReader(new FileInputStream(theFile), "Windows-1256");
BufferedReader buffered = new BufferedReader(r);
try {
  String line;
  while ((line = buffered.readLine()) != null) {
    // handle each line
  }
} finally {
  buffered.close();
}
2
  • what is gibrige text ?
    – Yazan
    Feb 18, 2015 at 14:34
  • a text that you can't understand Feb 18, 2015 at 17:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.