title: Read and Write UTF-8 characters from System.in stream
body: <p>if i print unicode String like <em>ελληνικά</em> on the console using the <code>print</code> method of <code>System.out</code> stream, its printed as expected (As i use Ubuntu mono in my output console which supports UTF characters).</p>
  
  <p>But if i try to read from the console unicode characters with UTF-8 encoding using System.in stream, it doesn't read properly.
   I have tried many different ways to achieve it using various reader classes with the System.in stream but it never works. So does anyone know a way i could do that</p>
  
  <p>Here is a sample of code </p>
  
  <pre><code>BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in, "UTF-8"));
  BufferedWriter console = new BufferedWriter(new OutputStreamWriter(System.out, "UTF-8"));
  
  console.write("p1: Γίνεται πάντως\n");
  console.flush();
  System.out.println("p2: Γίνεται πάντως");
  
  byte dataBytes[] = keyboard.readLine().getBytes(Charset.forName("UTF-8"));
  System.out.println("p3: " + new String(dataBytes));
  console.write("p4: " + new String(dataBytes, "UTF-8") + "\n");
  console.flush();
  Scanner scan = new Scanner(System.in, "UTF-8");
  
  System.out.println("p5: " + (char) System.in.read());
  System.out.println("p6: " + scan.nextLine());
  System.out.println("p7: " + keyboard.readLine());
  </code></pre>
  
  <p>and the output on my console:</p>
  
  <pre><code>p1: Γίνεται πάντως
  p2: Γίνεται πάντως
  Δέν
  p3: ���
  p4: ���
  Δέν
  p5: Ä
  p6: ��
  Δέν
  p7: ���
  </code></pre>
  
  <p>my IDE is Netbeans</p>