JDK 22 |
---|
22Resolved |
Relates :
|
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. The issue can be worked around in JDK 22 GA builds by running with `-XX:-CompactStrings` to disable the use of "Compact Strings". This issue will be fixed in a future update.