RFR: 8364320: String encodeUTF8 latin1 with negatives [v2]

Brett Okken duke at openjdk.org
Fri Aug 1 13:15:29 UTC 2025


> As suggested on mailing list, when encoding latin1 bytes to utf-8, we can count the leading positive bytes and in the case where there is a negative, we can copy all the positive values to the target byte[] prior to processing the remaining data 1 byte at a time.
> 
> https://mail.openjdk.org/pipermail/core-libs-dev/2025-July/149417.html

Brett Okken has updated the pull request incrementally with one additional commit since the last revision:

  coding conventions

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/26597/files
  - new: https://git.openjdk.org/jdk/pull/26597/files/947f9182..26bd9d94

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26597&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26597&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/26597.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26597/head:pull/26597

PR: https://git.openjdk.org/jdk/pull/26597


More information about the core-libs-dev mailing list