From: Michael Ow Date: Wed, 23 Sep 2015 20:47:33 +0000 (+0000) Subject: ICU-11869 Update 2022 code in ICU4J X-Git-Tag: milestone-59-0-1~819 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=953f0332939eabde7890ea701410ac65d754f08e;p=icu ICU-11869 Update 2022 code in ICU4J X-SVN-Rev: 38013 --- diff --git a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetISO2022.java b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetISO2022.java index f2d56cf1056..f993010d88a 100644 --- a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetISO2022.java +++ b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetISO2022.java @@ -1533,18 +1533,6 @@ class CharsetISO2022 extends CharsetICU { /******************** from unicode **********************/ /* preference order of JP charsets */ private final static byte []jpCharsetPref = { - ASCII, - JISX201, - ISO8859_1, - ISO8859_7, - JISX208, - JISX212, - GB2312, - KSC5601, - HWKANA_7BIT - }; - /* preference order of JP charsets for version 2,3,4*/ - private final static byte []jpCharsetPref_alt = { ASCII, JISX201, ISO8859_1, @@ -1837,26 +1825,13 @@ class CharsetISO2022 extends CharsetICU { choices[choiceCount++] = cs; csm &= ~CSM(cs); } - - /* - * version 2,3,4 of JP iso 2022 requires a different preference order for the possible charsets. - */ - if (cs == 0 && myConverterData.version >= 2) { - for (int i = 0; i < jpCharsetPref_alt.length; i++) { - cs = jpCharsetPref_alt[i]; - if ((CSM(cs) & csm) != 0) { - choices[choiceCount++] = cs; - csm &= ~CSM(cs); - } - } - } else { + /* try all the other charsets */ - for (int i = 0; i < jpCharsetPref.length; i++) { - cs = jpCharsetPref[i]; - if ((CSM(cs) & csm) != 0) { - choices[choiceCount++] = cs; - csm &= ~CSM(cs); - } + for (int i = 0; i < jpCharsetPref.length; i++) { + cs = jpCharsetPref[i]; + if ((CSM(cs) & csm) != 0) { + choices[choiceCount++] = cs; + csm &= ~CSM(cs); } } } diff --git a/icu4j/main/shared/data/testdata.jar b/icu4j/main/shared/data/testdata.jar index d4422d39173..f88a4fc65db 100755 --- a/icu4j/main/shared/data/testdata.jar +++ b/icu4j/main/shared/data/testdata.jar @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb53aca484d632c5192f7e8c3dfe44175ded5ca1aa27d547d6031d0c80f05cd0 -size 811313 +oid sha256:ad356f5c06cafd7253938133039fc2fee278913c9ba70968715b9e15b1243a01 +size 811321