I have a txt file. I'm not sure of the encoding of this file. Probably it's s EBCDIC. I have problem with Umlaute (äöü, ÜÄÖ) e.g. For example: Displayed: Mnchen should be: München Url to test file: http://wyslijto.pl/plik/yiewa11y3p
java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(
new InputStreamReader(
new FileInputStream("/Downloads/test.txt")));
// BufferedReader in = new BufferedReader(
// new InputStreamReader(
// new FileInputStream("/Downloads/test.txt"), Charset.forName("windows-1252")));
String str;
while ((str = in.readLine()) != null) {
System.out.println(str);
}
}
}