Answer the question
In order to leave comments, you need to log in
How to display Cyrillic text from a file?
It is required to display the contents of the file, which contains both Latin and Cyrillic.
try (BufferedReader fin = new BufferedReader(new FileReader(args[args.length - 1]))) {
while ((currLines = fin.readLine()) != null) {
System.out.println(currLines);
}
}
catch (FileNotFoundException error) {
System.out.println("File " + args[args.length - 1] + " not found.");
System.exit(0);
}
Answer the question
In order to leave comments, you need to log in
new InputStreamReader( new FileInputStream(filename), "cp1251"))
Explicit encoding.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question