How can I make this inputstream read a ISO-8859-15 encoded file?
BufferedReader r = new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.jet)));
I found this line which seemingly works:
BufferedReader br = new BufferedReader(new InputStreamReader(ftp.getInputStream(), "ISO-8859-15"));
But
BufferedReader r = new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.jet), "ISO-8859-15"));
does not.
It seems that:
BufferedReader r = new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.jet), Charset.forName("ISO-8859-15")));
works. Apparently you need to send a Charset, not a String with the encoding in this case. Given this it seems strange that this works then:
BufferedReader br = new BufferedReader(new InputStreamReader(ftp.getInputStream(), "ISO-8859-15"));