]> granicus.if.org Git - icu/commitdiff
ICU-11869 Update 2022 code in ICU4J
authorMichael Ow <mow@svn.icu-project.org>
Wed, 23 Sep 2015 20:47:33 +0000 (20:47 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Wed, 23 Sep 2015 20:47:33 +0000 (20:47 +0000)
X-SVN-Rev: 38013

icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetISO2022.java
icu4j/main/shared/data/testdata.jar

index f2d56cf10564f8946d2183df8a345939b5eac0c3..f993010d88ae226489f0f1fc32e05b95c8094460 100644 (file)
@@ -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);
                             }
                         }
                     }
index d4422d391734b24c255cdb91fab7736579860275..f88a4fc65db159b1c0a88467b3ae6185d32ac4c4 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:eb53aca484d632c5192f7e8c3dfe44175ded5ca1aa27d547d6031d0c80f05cd0
-size 811313
+oid sha256:ad356f5c06cafd7253938133039fc2fee278913c9ba70968715b9e15b1243a01
+size 811321