-
Enhancement
-
Resolution: Won't Fix
-
P5
-
None
-
9
-
None
Javadoc currently states:
--------------------------------
public final float CharsetEncoder.maxBytesPerChar()
Returns the maximum number of bytes that will be produced for each character of input.
This value may be used to compute the worst-case size of the output buffer required for a given input sequence.
--------------------------------
This may be misinterpreted, as it may be not clear what CHARACTERs this sentence is about.
If they were Unicode code-points, UTF8Encoder.maxBytesPerChar() should return 4.0.
However, as the statement is in fact about Java characters, it correctly returns 3.0.
--------------------------------
public final float CharsetEncoder.maxBytesPerChar()
Returns the maximum number of bytes that will be produced for each character of input.
This value may be used to compute the worst-case size of the output buffer required for a given input sequence.
--------------------------------
This may be misinterpreted, as it may be not clear what CHARACTERs this sentence is about.
If they were Unicode code-points, UTF8Encoder.maxBytesPerChar() should return 4.0.
However, as the statement is in fact about Java characters, it correctly returns 3.0.
- clones
-
JDK-8058875 javadoc for CharsetEncoder.maxBytesPerChar() should be made clearer
-
- Closed
-
- relates to
-
JDK-8230531 API Doc for CharsetEncoder.maxBytesPerChar() should be clearer about BOMs
-
- Closed
-