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

Need to a public API to get Console charset

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P3
    • Resolution: Duplicate
    • None
    • None
    • core-libs
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: