All JCL tests pass

This commit is contained in:
Alexey Andreev 2014-03-14 14:46:17 +04:00
parent 739f666c0a
commit ba2a3e12e9

View File

@ -82,8 +82,7 @@ public class UTF8Charset extends Charset {
byte b2 = source.get();
byte b3 = source.get();
byte b4 = source.get();
int code = (((b & 0x07) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3F) << 6) | (b4 & 0x3F)) -
UTF16Helper.SUPPLEMENTARY_PLANE;
int code = ((b & 0x07) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3F) << 6) | (b4 & 0x3F);
dest.put(UTF16Helper.highSurrogate(code));
dest.put(UTF16Helper.lowSurrogate(code));
}