RFR [8058875]: CharsetEncoder.maxBytesPerChar() should return 4 for UTF-8

Ivan Gerasimov ivan.gerasimov at oracle.com
Mon Sep 22 20:14:55 UTC 2014


Hello!

The UTF-8 encoding allows characters that are 4 bytes long.
However, CharsetEncoder.maxBytesPerChar() currently returns 3.0, which 
is not always enough.

Would you please review the simple fix for this issue?

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8058875
WEBREV: http://cr.openjdk.java.net/~igerasim/8058875/0/webrev/

Sincerely yours,
Ivan


More information about the nio-dev mailing list