I use Java to read content from file into a String. But String can't display some characters, like ć ş ę.
Here is my code:
FileInputStream in = new FileInputStream(f);
BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
PrintStream out = new PrintStream(System.out, false, "UTF-8");
while(true) {
String line = br.readLine();
if(line == null)
break;
out.println(line);
}
How can I solve this problem?