Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8325605 Regression in round-tripping UTF-16 strings after JDK-8311906
  3. JDK-8325737

Release Note: `Files.readString` May Return Incorrect String When Using UTF-16 or Other Charsets

    XMLWordPrintable

Details

    • 22

    Description

      Strings read with `java.nio.files.Files.readString` may return incorrect strings when decoding with a charset other than US-ASCII, ISO08859-1, or UTF-8. Reading strings with other multi-byte charsets, such as UTF_16, may produce incorrect results.

      As a work-around, disable compact strings by setting `-XX:-CompactStrings` on the command line.

      This issue will be fixed in a future update.

      Attachments

        Issue Links

          Activity

            People

              rriggs Roger Riggs
              rriggs Roger Riggs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: