From 80ffe66b0919674d71266738659b536a23efb51e Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Tue, 3 May 2011 22:15:36 +0000 Subject: [PATCH] ICU-7226 Fix maxBytesPerChar value for UTF-16LE,version=1 and UTF-16BE,version=1 in ICU4J X-SVN-Rev: 29998 --- .../charset/src/com/ibm/icu/charset/CharsetUTF16.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetUTF16.java b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetUTF16.java index 07796f7b26..a9706be494 100644 --- a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetUTF16.java +++ b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetUTF16.java @@ -1,6 +1,6 @@ /** ******************************************************************************* - * Copyright (C) 2006-2010, International Business Machines Corporation and * + * Copyright (C) 2006-2011, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ @@ -62,12 +62,7 @@ class CharsetUTF16 extends CharsetICU { this.endianXOR = ENDIAN_XOR_LE; } - /* The maxBytesPerChar for UnicodeBig/UnicodeLittle should be 4. */ - if (isEndianSpecified && version == 1) { - maxBytesPerChar = 4; - } else { - maxBytesPerChar = 2; - } + maxBytesPerChar = 2; minBytesPerChar = 2; maxCharsPerByte = 1; }