2004-10-16 Michael Koch <konqueror@gmx.de>

* gnu/java/nio/charset/UTF_16Encoder.java
	(UTF_16Encoder): Fixed maxBytesPerChar handling.

From-SVN: r89150
This commit is contained in:
Michael Koch 2004-10-16 17:58:01 +00:00 committed by Michael Koch
parent 7af8968e98
commit 752ef8732d
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-10-16 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/charset/UTF_16Encoder.java
(UTF_16Encoder): Fixed maxBytesPerChar handling.
2004-10-16 Michael Koch <konqueror@gmx.de>
* java/math/BigDecimal.java, java/math/BigInteger.java:

View File

@ -63,7 +63,7 @@ final class UTF_16Encoder extends CharsetEncoder
UTF_16Encoder (Charset cs, int byteOrder, boolean useByteOrderMark)
{
super (cs, 2.0f,
useByteOrderMark ? 4.0f : 2.0f,
useByteOrderMark ? 2.0f : 4.0f,
byteOrder == BIG_ENDIAN
? new byte[] { (byte) 0xFF, (byte) 0xFD }
: new byte[] { (byte) 0xFD, (byte) 0xFF });