<i18n dev> RFR: 8364365: HKSCS encoder does not properly set the replacement character [v2]
Xueming Shen
sherman at openjdk.org
Thu Aug 7 19:19:16 UTC 2025
On Thu, 7 Aug 2025 15:07:08 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders.
>
> Volkan Yazici has updated the pull request incrementally with two additional commits since the last revision:
>
> - Improve double-`char` unmappable search
> - Improve single-`char` unmappable search
test/jdk/sun/nio/cs/TestEncoderReplaceLatin1.java line 251:
> 249: sb.append("%sU+%04X".formatted(i > 0 ? ", " : "", (int) c));
> 250: }
> 251: return sb.append(']').toString();
just for fun :-)
return IntStream.range(0, cs.length)
.mapToObj(i -> String.format("U+%04X", (int) cs[i]))
.collect(Collectors.joining(", ", "[", "]"));
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2261207568
More information about the i18n-dev
mailing list