From eeed45b15262cf80d06404f4aae4afc5dde16354 Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Tue, 8 May 2007 17:53:07 +0000 Subject: [PATCH] ICU-5444 Update to UTF-7 converter which addresses the null replacement exception. X-SVN-Rev: 21497 --- icu4j/src/com/ibm/icu/charset/CharsetUTF7.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/icu4j/src/com/ibm/icu/charset/CharsetUTF7.java b/icu4j/src/com/ibm/icu/charset/CharsetUTF7.java index 185f20ffa4..b0d1a26c45 100644 --- a/icu4j/src/com/ibm/icu/charset/CharsetUTF7.java +++ b/icu4j/src/com/ibm/icu/charset/CharsetUTF7.java @@ -20,10 +20,13 @@ import com.ibm.icu.text.UTF16; * */ class CharsetUTF7 extends CharsetICU { - protected byte[] fromUSubstitution = null; + protected byte[] fromUSubstitution = new byte[]{0x2b, 0x2f, 0x76}; public CharsetUTF7(String icuCanonicalName, String javaCanonicalName, String[] aliases) { super(icuCanonicalName, javaCanonicalName, aliases); + maxBytesPerChar = 3; /* max 3 bytes per code unit from UTF-7 (base64) */ + minBytesPerChar = 1; + maxCharsPerByte = 1; } private static boolean inSetD(char c) {