<i18n dev> RFR: 8372353: API to compute the byte length of a String encoded in a given Charset [v17]
Alan Bateman
alanb at openjdk.org
Tue Feb 10 13:59:14 UTC 2026
On Tue, 10 Feb 2026 12:20:36 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:
> Your demo seems to optimize only for `CodingErrorAction.REPLACE`, but that's probably more of an implementation detail than a limiting factor of API design, right?
String.getBytes(Charset) uses REPLACE action, it doesn't ignore (which would change the length) or throw.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28454#issuecomment-3877788819
More information about the i18n-dev
mailing list