On Mon, 3 Jul 2023 09:20:04 GMT, Glavo <d...@openjdk.org> wrote: >> String str0 = new String(new byte[]{-75}, StandardCharsets.ISO_8859_1); >> String str1 = str0.toUpperCase(); >> >> str0.coder is LATIN1 >> str1.coder is UTF16 > >> ```java >> String str0 = new String(new byte[]{-75}, StandardCharsets.ISO_8859_1); >> String str1 = str0.toUpperCase(); >> ``` >> >> str0.coder is LATIN1 str1.coder is UTF16 > > This happens only with `toUpperCase`, not with `toLowerCase`.
another example: String str0 = new String(new byte[]{-1}, StandardCharsets.ISO_8859_1); String str1 = str0.toUpperCase(); str0.coder is LATIN1 str1.coder is UTF16 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14751#discussion_r1250548264