11 Replies Latest reply on Sep 9, 2010 6:36 PM by 843790

    System.in: How to read Unicode?


      I have written a console application in Java. But I have a problem to read special characters. It seems that System.in doesn’t support Unicode. Is there is a way to enable Unicode? I have tested my program with Netbeans and Eclipse with their integrated consoles. In both IDEs I have the same problem.

      Demo1: neither ä (German character) nor я (Russian character) work
      String text = new BufferedReader(new InputStreamReader(System.in, "UTF-8")).readLine();
      Demo1: ä (German character) work s, я (Russian character) does not work
      String text = new BufferedReader(new InputStreamReader(System.in)).readLine();
      How can I support Unicode as input?