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

(scanner) Scanner should have constructor overloads that take Charset

XMLWordPrintable

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

      Scanner currently has the following constructors that take a charset name:

      Scanner(File source, String charsetName)
      Scanner(InputStream source, String charsetName)
      Scanner(Path source, String charsetName)
      Scanner(ReadableByteChannel source, String charsetName)

      It would be nice to have overloads that take actual Charset objects instead of charset names, which must be looked up and converted into Charset objects.

            joehw Joe Wang
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: