Last active
January 24, 2017 16:01
-
-
Save Climber24/8c540a5418f624f809c4ac8ce439bf40 to your computer and use it in GitHub Desktop.
JAVA Reading cyrillic file with BufferedReader and FileInputStream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FileCyrillic | |
| { | |
| public static void main(String[] args) throws IOException | |
| { | |
| BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); | |
| String fileName = reader.readLine(); | |
| final BufferedReader br = new BufferedReader( new InputStreamReader(new FileInputStream(fileName), | |
| "UTF8")); | |
| String nextString; | |
| while ((nextString = br.readLine()) != null) { | |
| System.out.println(nextString); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment