SyntaxFix
Write A Post
Hire A Developer
Questions
You are reading the file right but the problem seems to be with the default encoding of System.out. Try this to print the UTF-8 string-
System.out
UTF-8
PrintStream out = new PrintStream(System.out, true, "UTF-8"); out.println(str);