title: java convert String windows-1251 to utf8
body: <pre><code>Scanner sc = new Scanner(System.in);
      System.out.println("Enter text: ");
      String text = sc.nextLine();
      try {
          String result = new String(text.getBytes("windows-1251"), Charset.forName("UTF-8"));
          System.out.println(result);
      } catch (UnsupportedEncodingException e) {
          System.out.println(e);
      }
  </code></pre>
  
  <p>I'm trying change keyboard: input cyrylic keyboard, output latin. Example: qwerty +> йцукен</p>
  
  <p>It doesn't work, can anyone tell me what i'm doing wrong? </p>