Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8011928

Need to a public API to get Console charset

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • None
    • core-libs
    • None

      A DESCRIPTION OF THE REQUEST :
      The Console charset is actually present in java.io.Console, with the field named 'cs', the problem is it's private, there should be a public API to get it.

      JUSTIFICATION :
      Console charset is necessary to correctly read console input.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      need a method like
          java.io.Console#getCharset()
      to get the console charset
      ACTUAL -
      java.io.Console.cs is private and there's no public API to get it.

      CUSTOMER SUBMITTED WORKAROUND :
      use reflection to access Console.cs by setting it accessible.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: