Internal change
PiperOrigin-RevId: 259948650
Change-Id: I0358169243dc93f65bd76320a14d3f1d0bcd9b83
diff --git a/org/mozilla/intl/chardet/Big5Statistics.java b/org/mozilla/intl/chardet/Big5Statistics.java
new file mode 100644
index 0000000..cd74f42
--- /dev/null
+++ b/org/mozilla/intl/chardet/Big5Statistics.java
@@ -0,0 +1,253 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.* ;
+
+public class Big5Statistics extends nsEUCStatistics {
+
+ static float[] mFirstByteFreq ;
+ static float mFirstByteStdDev;
+ static float mFirstByteMean;
+ static float mFirstByteWeight;
+ static float[] mSecondByteFreq;
+ static float mSecondByteStdDev;
+ static float mSecondByteMean;
+ static float mSecondByteWeight;
+
+ public float[] mFirstByteFreq() { return mFirstByteFreq; }
+ public float mFirstByteStdDev() { return mFirstByteStdDev; }
+ public float mFirstByteMean() { return mFirstByteMean; }
+ public float mFirstByteWeight() { return mFirstByteWeight; }
+ public float[] mSecondByteFreq() { return mSecondByteFreq; }
+ public float mSecondByteStdDev() { return mSecondByteStdDev; }
+ public float mSecondByteMean() { return mSecondByteMean; }
+ public float mSecondByteWeight() { return mSecondByteWeight; }
+
+ public Big5Statistics() {
+
+ mFirstByteFreq = new float[] {
+ 0.000000f, // FreqH[a1]
+ 0.000000f, // FreqH[a2]
+ 0.000000f, // FreqH[a3]
+ 0.114427f, // FreqH[a4]
+ 0.061058f, // FreqH[a5]
+ 0.075598f, // FreqH[a6]
+ 0.048386f, // FreqH[a7]
+ 0.063966f, // FreqH[a8]
+ 0.027094f, // FreqH[a9]
+ 0.095787f, // FreqH[aa]
+ 0.029525f, // FreqH[ab]
+ 0.031331f, // FreqH[ac]
+ 0.036915f, // FreqH[ad]
+ 0.021805f, // FreqH[ae]
+ 0.019349f, // FreqH[af]
+ 0.037496f, // FreqH[b0]
+ 0.018068f, // FreqH[b1]
+ 0.012760f, // FreqH[b2]
+ 0.030053f, // FreqH[b3]
+ 0.017339f, // FreqH[b4]
+ 0.016731f, // FreqH[b5]
+ 0.019501f, // FreqH[b6]
+ 0.011240f, // FreqH[b7]
+ 0.032973f, // FreqH[b8]
+ 0.016658f, // FreqH[b9]
+ 0.015872f, // FreqH[ba]
+ 0.021458f, // FreqH[bb]
+ 0.012378f, // FreqH[bc]
+ 0.017003f, // FreqH[bd]
+ 0.020802f, // FreqH[be]
+ 0.012454f, // FreqH[bf]
+ 0.009239f, // FreqH[c0]
+ 0.012829f, // FreqH[c1]
+ 0.007922f, // FreqH[c2]
+ 0.010079f, // FreqH[c3]
+ 0.009815f, // FreqH[c4]
+ 0.010104f, // FreqH[c5]
+ 0.000000f, // FreqH[c6]
+ 0.000000f, // FreqH[c7]
+ 0.000000f, // FreqH[c8]
+ 0.000053f, // FreqH[c9]
+ 0.000035f, // FreqH[ca]
+ 0.000105f, // FreqH[cb]
+ 0.000031f, // FreqH[cc]
+ 0.000088f, // FreqH[cd]
+ 0.000027f, // FreqH[ce]
+ 0.000027f, // FreqH[cf]
+ 0.000026f, // FreqH[d0]
+ 0.000035f, // FreqH[d1]
+ 0.000024f, // FreqH[d2]
+ 0.000034f, // FreqH[d3]
+ 0.000375f, // FreqH[d4]
+ 0.000025f, // FreqH[d5]
+ 0.000028f, // FreqH[d6]
+ 0.000020f, // FreqH[d7]
+ 0.000024f, // FreqH[d8]
+ 0.000028f, // FreqH[d9]
+ 0.000031f, // FreqH[da]
+ 0.000059f, // FreqH[db]
+ 0.000040f, // FreqH[dc]
+ 0.000030f, // FreqH[dd]
+ 0.000079f, // FreqH[de]
+ 0.000037f, // FreqH[df]
+ 0.000040f, // FreqH[e0]
+ 0.000023f, // FreqH[e1]
+ 0.000030f, // FreqH[e2]
+ 0.000027f, // FreqH[e3]
+ 0.000064f, // FreqH[e4]
+ 0.000020f, // FreqH[e5]
+ 0.000027f, // FreqH[e6]
+ 0.000025f, // FreqH[e7]
+ 0.000074f, // FreqH[e8]
+ 0.000019f, // FreqH[e9]
+ 0.000023f, // FreqH[ea]
+ 0.000021f, // FreqH[eb]
+ 0.000018f, // FreqH[ec]
+ 0.000017f, // FreqH[ed]
+ 0.000035f, // FreqH[ee]
+ 0.000021f, // FreqH[ef]
+ 0.000019f, // FreqH[f0]
+ 0.000025f, // FreqH[f1]
+ 0.000017f, // FreqH[f2]
+ 0.000037f, // FreqH[f3]
+ 0.000018f, // FreqH[f4]
+ 0.000018f, // FreqH[f5]
+ 0.000019f, // FreqH[f6]
+ 0.000022f, // FreqH[f7]
+ 0.000033f, // FreqH[f8]
+ 0.000032f, // FreqH[f9]
+ 0.000000f, // FreqH[fa]
+ 0.000000f, // FreqH[fb]
+ 0.000000f, // FreqH[fc]
+ 0.000000f, // FreqH[fd]
+ 0.000000f // FreqH[fe]
+ };
+
+ mFirstByteStdDev = 0.020606f; // Lead Byte StdDev
+ mFirstByteMean = 0.010638f; // Lead Byte Mean
+ mFirstByteWeight = 0.675261f; // Lead Byte Weight
+
+ mSecondByteFreq = new float[] {
+ 0.020256f, // FreqL[a1]
+ 0.003293f, // FreqL[a2]
+ 0.045811f, // FreqL[a3]
+ 0.016650f, // FreqL[a4]
+ 0.007066f, // FreqL[a5]
+ 0.004146f, // FreqL[a6]
+ 0.009229f, // FreqL[a7]
+ 0.007333f, // FreqL[a8]
+ 0.003296f, // FreqL[a9]
+ 0.005239f, // FreqL[aa]
+ 0.008282f, // FreqL[ab]
+ 0.003791f, // FreqL[ac]
+ 0.006116f, // FreqL[ad]
+ 0.003536f, // FreqL[ae]
+ 0.004024f, // FreqL[af]
+ 0.016654f, // FreqL[b0]
+ 0.009334f, // FreqL[b1]
+ 0.005429f, // FreqL[b2]
+ 0.033392f, // FreqL[b3]
+ 0.006121f, // FreqL[b4]
+ 0.008983f, // FreqL[b5]
+ 0.002801f, // FreqL[b6]
+ 0.004221f, // FreqL[b7]
+ 0.010357f, // FreqL[b8]
+ 0.014695f, // FreqL[b9]
+ 0.077937f, // FreqL[ba]
+ 0.006314f, // FreqL[bb]
+ 0.004020f, // FreqL[bc]
+ 0.007331f, // FreqL[bd]
+ 0.007150f, // FreqL[be]
+ 0.005341f, // FreqL[bf]
+ 0.009195f, // FreqL[c0]
+ 0.005350f, // FreqL[c1]
+ 0.005698f, // FreqL[c2]
+ 0.004472f, // FreqL[c3]
+ 0.007242f, // FreqL[c4]
+ 0.004039f, // FreqL[c5]
+ 0.011154f, // FreqL[c6]
+ 0.016184f, // FreqL[c7]
+ 0.004741f, // FreqL[c8]
+ 0.012814f, // FreqL[c9]
+ 0.007679f, // FreqL[ca]
+ 0.008045f, // FreqL[cb]
+ 0.016631f, // FreqL[cc]
+ 0.009451f, // FreqL[cd]
+ 0.016487f, // FreqL[ce]
+ 0.007287f, // FreqL[cf]
+ 0.012688f, // FreqL[d0]
+ 0.017421f, // FreqL[d1]
+ 0.013205f, // FreqL[d2]
+ 0.031480f, // FreqL[d3]
+ 0.003404f, // FreqL[d4]
+ 0.009149f, // FreqL[d5]
+ 0.008921f, // FreqL[d6]
+ 0.007514f, // FreqL[d7]
+ 0.008683f, // FreqL[d8]
+ 0.008203f, // FreqL[d9]
+ 0.031403f, // FreqL[da]
+ 0.011733f, // FreqL[db]
+ 0.015617f, // FreqL[dc]
+ 0.015306f, // FreqL[dd]
+ 0.004004f, // FreqL[de]
+ 0.010899f, // FreqL[df]
+ 0.009961f, // FreqL[e0]
+ 0.008388f, // FreqL[e1]
+ 0.010920f, // FreqL[e2]
+ 0.003925f, // FreqL[e3]
+ 0.008585f, // FreqL[e4]
+ 0.009108f, // FreqL[e5]
+ 0.015546f, // FreqL[e6]
+ 0.004659f, // FreqL[e7]
+ 0.006934f, // FreqL[e8]
+ 0.007023f, // FreqL[e9]
+ 0.020252f, // FreqL[ea]
+ 0.005387f, // FreqL[eb]
+ 0.024704f, // FreqL[ec]
+ 0.006963f, // FreqL[ed]
+ 0.002625f, // FreqL[ee]
+ 0.009512f, // FreqL[ef]
+ 0.002971f, // FreqL[f0]
+ 0.008233f, // FreqL[f1]
+ 0.010000f, // FreqL[f2]
+ 0.011973f, // FreqL[f3]
+ 0.010553f, // FreqL[f4]
+ 0.005945f, // FreqL[f5]
+ 0.006349f, // FreqL[f6]
+ 0.009401f, // FreqL[f7]
+ 0.008577f, // FreqL[f8]
+ 0.008186f, // FreqL[f9]
+ 0.008159f, // FreqL[fa]
+ 0.005033f, // FreqL[fb]
+ 0.008714f, // FreqL[fc]
+ 0.010614f, // FreqL[fd]
+ 0.006554f // FreqL[fe]
+ };
+
+ mSecondByteStdDev = 0.009909f; // Trail Byte StdDev
+ mSecondByteMean = 0.010638f; // Trail Byte Mean
+ mSecondByteWeight = 0.324739f ; // Trial Byte Weight
+
+ }
+}
+
diff --git a/org/mozilla/intl/chardet/EUCJPStatistics.java b/org/mozilla/intl/chardet/EUCJPStatistics.java
new file mode 100644
index 0000000..8e3d363
--- /dev/null
+++ b/org/mozilla/intl/chardet/EUCJPStatistics.java
@@ -0,0 +1,255 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.* ;
+
+public class EUCJPStatistics extends nsEUCStatistics {
+
+
+ static float[] mFirstByteFreq ;
+ static float mFirstByteStdDev;
+ static float mFirstByteMean;
+ static float mFirstByteWeight;
+ static float[] mSecondByteFreq;
+ static float mSecondByteStdDev;
+ static float mSecondByteMean;
+ static float mSecondByteWeight;
+
+ public float[] mFirstByteFreq() { return mFirstByteFreq; }
+ public float mFirstByteStdDev() { return mFirstByteStdDev; }
+ public float mFirstByteMean() { return mFirstByteMean; }
+ public float mFirstByteWeight() { return mFirstByteWeight; }
+ public float[] mSecondByteFreq() { return mSecondByteFreq; }
+ public float mSecondByteStdDev() { return mSecondByteStdDev; }
+ public float mSecondByteMean() { return mSecondByteMean; }
+ public float mSecondByteWeight() { return mSecondByteWeight; }
+
+ public EUCJPStatistics() {
+
+ mFirstByteFreq = new float[] {
+ 0.364808f, // FreqH[a1]
+ 0.000000f, // FreqH[a2]
+ 0.000000f, // FreqH[a3]
+ 0.145325f, // FreqH[a4]
+ 0.304891f, // FreqH[a5]
+ 0.000000f, // FreqH[a6]
+ 0.000000f, // FreqH[a7]
+ 0.000000f, // FreqH[a8]
+ 0.000000f, // FreqH[a9]
+ 0.000000f, // FreqH[aa]
+ 0.000000f, // FreqH[ab]
+ 0.000000f, // FreqH[ac]
+ 0.000000f, // FreqH[ad]
+ 0.000000f, // FreqH[ae]
+ 0.000000f, // FreqH[af]
+ 0.001835f, // FreqH[b0]
+ 0.010771f, // FreqH[b1]
+ 0.006462f, // FreqH[b2]
+ 0.001157f, // FreqH[b3]
+ 0.002114f, // FreqH[b4]
+ 0.003231f, // FreqH[b5]
+ 0.001356f, // FreqH[b6]
+ 0.007420f, // FreqH[b7]
+ 0.004189f, // FreqH[b8]
+ 0.003231f, // FreqH[b9]
+ 0.003032f, // FreqH[ba]
+ 0.033190f, // FreqH[bb]
+ 0.006303f, // FreqH[bc]
+ 0.006064f, // FreqH[bd]
+ 0.009973f, // FreqH[be]
+ 0.002354f, // FreqH[bf]
+ 0.003670f, // FreqH[c0]
+ 0.009135f, // FreqH[c1]
+ 0.001675f, // FreqH[c2]
+ 0.002792f, // FreqH[c3]
+ 0.002194f, // FreqH[c4]
+ 0.014720f, // FreqH[c5]
+ 0.011928f, // FreqH[c6]
+ 0.000878f, // FreqH[c7]
+ 0.013124f, // FreqH[c8]
+ 0.001077f, // FreqH[c9]
+ 0.009295f, // FreqH[ca]
+ 0.003471f, // FreqH[cb]
+ 0.002872f, // FreqH[cc]
+ 0.002433f, // FreqH[cd]
+ 0.000957f, // FreqH[ce]
+ 0.001636f, // FreqH[cf]
+ 0.000000f, // FreqH[d0]
+ 0.000000f, // FreqH[d1]
+ 0.000000f, // FreqH[d2]
+ 0.000000f, // FreqH[d3]
+ 0.000000f, // FreqH[d4]
+ 0.000000f, // FreqH[d5]
+ 0.000000f, // FreqH[d6]
+ 0.000000f, // FreqH[d7]
+ 0.000000f, // FreqH[d8]
+ 0.000000f, // FreqH[d9]
+ 0.000000f, // FreqH[da]
+ 0.000000f, // FreqH[db]
+ 0.000000f, // FreqH[dc]
+ 0.000000f, // FreqH[dd]
+ 0.000080f, // FreqH[de]
+ 0.000279f, // FreqH[df]
+ 0.000000f, // FreqH[e0]
+ 0.000000f, // FreqH[e1]
+ 0.000000f, // FreqH[e2]
+ 0.000000f, // FreqH[e3]
+ 0.000000f, // FreqH[e4]
+ 0.000000f, // FreqH[e5]
+ 0.000000f, // FreqH[e6]
+ 0.000000f, // FreqH[e7]
+ 0.000000f, // FreqH[e8]
+ 0.000000f, // FreqH[e9]
+ 0.000000f, // FreqH[ea]
+ 0.000000f, // FreqH[eb]
+ 0.000000f, // FreqH[ec]
+ 0.000000f, // FreqH[ed]
+ 0.000000f, // FreqH[ee]
+ 0.000000f, // FreqH[ef]
+ 0.000000f, // FreqH[f0]
+ 0.000000f, // FreqH[f1]
+ 0.000000f, // FreqH[f2]
+ 0.000000f, // FreqH[f3]
+ 0.000000f, // FreqH[f4]
+ 0.000000f, // FreqH[f5]
+ 0.000000f, // FreqH[f6]
+ 0.000000f, // FreqH[f7]
+ 0.000000f, // FreqH[f8]
+ 0.000000f, // FreqH[f9]
+ 0.000000f, // FreqH[fa]
+ 0.000000f, // FreqH[fb]
+ 0.000000f, // FreqH[fc]
+ 0.000080f, // FreqH[fd]
+ 0.000000f // FreqH[fe]
+
+ };
+
+ mFirstByteStdDev = 0.050407f; // Lead Byte StdDev
+ mFirstByteMean = 0.010638f; // Lead Byte Mean
+ mFirstByteWeight = 0.640871f; // Lead Byte Weight
+
+ mSecondByteFreq = new float[] {
+ 0.002473f, // FreqL[a1]
+ 0.039134f, // FreqL[a2]
+ 0.152745f, // FreqL[a3]
+ 0.009694f, // FreqL[a4]
+ 0.000359f, // FreqL[a5]
+ 0.022180f, // FreqL[a6]
+ 0.000758f, // FreqL[a7]
+ 0.004308f, // FreqL[a8]
+ 0.000160f, // FreqL[a9]
+ 0.002513f, // FreqL[aa]
+ 0.003072f, // FreqL[ab]
+ 0.001316f, // FreqL[ac]
+ 0.003830f, // FreqL[ad]
+ 0.001037f, // FreqL[ae]
+ 0.003590f, // FreqL[af]
+ 0.000957f, // FreqL[b0]
+ 0.000160f, // FreqL[b1]
+ 0.000239f, // FreqL[b2]
+ 0.006462f, // FreqL[b3]
+ 0.001596f, // FreqL[b4]
+ 0.031554f, // FreqL[b5]
+ 0.001316f, // FreqL[b6]
+ 0.002194f, // FreqL[b7]
+ 0.016555f, // FreqL[b8]
+ 0.003271f, // FreqL[b9]
+ 0.000678f, // FreqL[ba]
+ 0.000598f, // FreqL[bb]
+ 0.206438f, // FreqL[bc]
+ 0.000718f, // FreqL[bd]
+ 0.001077f, // FreqL[be]
+ 0.003710f, // FreqL[bf]
+ 0.001356f, // FreqL[c0]
+ 0.001356f, // FreqL[c1]
+ 0.000439f, // FreqL[c2]
+ 0.004388f, // FreqL[c3]
+ 0.005704f, // FreqL[c4]
+ 0.000878f, // FreqL[c5]
+ 0.010172f, // FreqL[c6]
+ 0.007061f, // FreqL[c7]
+ 0.014680f, // FreqL[c8]
+ 0.000638f, // FreqL[c9]
+ 0.025730f, // FreqL[ca]
+ 0.002792f, // FreqL[cb]
+ 0.000718f, // FreqL[cc]
+ 0.001795f, // FreqL[cd]
+ 0.091551f, // FreqL[ce]
+ 0.000758f, // FreqL[cf]
+ 0.003909f, // FreqL[d0]
+ 0.000558f, // FreqL[d1]
+ 0.031195f, // FreqL[d2]
+ 0.007061f, // FreqL[d3]
+ 0.001316f, // FreqL[d4]
+ 0.022579f, // FreqL[d5]
+ 0.006981f, // FreqL[d6]
+ 0.007260f, // FreqL[d7]
+ 0.001117f, // FreqL[d8]
+ 0.000239f, // FreqL[d9]
+ 0.012127f, // FreqL[da]
+ 0.000878f, // FreqL[db]
+ 0.003790f, // FreqL[dc]
+ 0.001077f, // FreqL[dd]
+ 0.000758f, // FreqL[de]
+ 0.002114f, // FreqL[df]
+ 0.002234f, // FreqL[e0]
+ 0.000678f, // FreqL[e1]
+ 0.002992f, // FreqL[e2]
+ 0.003311f, // FreqL[e3]
+ 0.023416f, // FreqL[e4]
+ 0.001237f, // FreqL[e5]
+ 0.002753f, // FreqL[e6]
+ 0.005146f, // FreqL[e7]
+ 0.002194f, // FreqL[e8]
+ 0.007021f, // FreqL[e9]
+ 0.008497f, // FreqL[ea]
+ 0.013763f, // FreqL[eb]
+ 0.011768f, // FreqL[ec]
+ 0.006303f, // FreqL[ed]
+ 0.001915f, // FreqL[ee]
+ 0.000638f, // FreqL[ef]
+ 0.008776f, // FreqL[f0]
+ 0.000918f, // FreqL[f1]
+ 0.003431f, // FreqL[f2]
+ 0.057603f, // FreqL[f3]
+ 0.000439f, // FreqL[f4]
+ 0.000439f, // FreqL[f5]
+ 0.000758f, // FreqL[f6]
+ 0.002872f, // FreqL[f7]
+ 0.001675f, // FreqL[f8]
+ 0.011050f, // FreqL[f9]
+ 0.000000f, // FreqL[fa]
+ 0.000279f, // FreqL[fb]
+ 0.012127f, // FreqL[fc]
+ 0.000718f, // FreqL[fd]
+ 0.007380f // FreqL[fe]
+
+ };
+
+ mSecondByteStdDev = 0.028247f; // Trail Byte StdDev
+ mSecondByteMean = 0.010638f; // Trail Byte Mean
+ mSecondByteWeight = 0.359129f; // Trial Byte Weight
+ }
+
+}
diff --git a/org/mozilla/intl/chardet/EUCKRStatistics.java b/org/mozilla/intl/chardet/EUCKRStatistics.java
new file mode 100644
index 0000000..4559958
--- /dev/null
+++ b/org/mozilla/intl/chardet/EUCKRStatistics.java
@@ -0,0 +1,255 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.* ;
+
+public class EUCKRStatistics extends nsEUCStatistics {
+
+
+ static float[] mFirstByteFreq ;
+ static float mFirstByteStdDev;
+ static float mFirstByteMean;
+ static float mFirstByteWeight;
+ static float[] mSecondByteFreq;
+ static float mSecondByteStdDev;
+ static float mSecondByteMean;
+ static float mSecondByteWeight;
+
+ public float[] mFirstByteFreq() { return mFirstByteFreq; }
+ public float mFirstByteStdDev() { return mFirstByteStdDev; }
+ public float mFirstByteMean() { return mFirstByteMean; }
+ public float mFirstByteWeight() { return mFirstByteWeight; }
+ public float[] mSecondByteFreq() { return mSecondByteFreq; }
+ public float mSecondByteStdDev() { return mSecondByteStdDev; }
+ public float mSecondByteMean() { return mSecondByteMean; }
+ public float mSecondByteWeight() { return mSecondByteWeight; }
+
+ public EUCKRStatistics() {
+
+ mFirstByteFreq = new float[] {
+ 0.000000f, // FreqH[a1]
+ 0.000000f, // FreqH[a2]
+ 0.000000f, // FreqH[a3]
+ 0.000000f, // FreqH[a4]
+ 0.000000f, // FreqH[a5]
+ 0.000000f, // FreqH[a6]
+ 0.000000f, // FreqH[a7]
+ 0.000412f, // FreqH[a8]
+ 0.000000f, // FreqH[a9]
+ 0.000000f, // FreqH[aa]
+ 0.000000f, // FreqH[ab]
+ 0.000000f, // FreqH[ac]
+ 0.000000f, // FreqH[ad]
+ 0.000000f, // FreqH[ae]
+ 0.000000f, // FreqH[af]
+ 0.057502f, // FreqH[b0]
+ 0.033182f, // FreqH[b1]
+ 0.002267f, // FreqH[b2]
+ 0.016076f, // FreqH[b3]
+ 0.014633f, // FreqH[b4]
+ 0.032976f, // FreqH[b5]
+ 0.004122f, // FreqH[b6]
+ 0.011336f, // FreqH[b7]
+ 0.058533f, // FreqH[b8]
+ 0.024526f, // FreqH[b9]
+ 0.025969f, // FreqH[ba]
+ 0.054411f, // FreqH[bb]
+ 0.019580f, // FreqH[bc]
+ 0.063273f, // FreqH[bd]
+ 0.113974f, // FreqH[be]
+ 0.029885f, // FreqH[bf]
+ 0.150041f, // FreqH[c0]
+ 0.059151f, // FreqH[c1]
+ 0.002679f, // FreqH[c2]
+ 0.009893f, // FreqH[c3]
+ 0.014839f, // FreqH[c4]
+ 0.026381f, // FreqH[c5]
+ 0.015045f, // FreqH[c6]
+ 0.069456f, // FreqH[c7]
+ 0.089860f, // FreqH[c8]
+ 0.000000f, // FreqH[c9]
+ 0.000000f, // FreqH[ca]
+ 0.000000f, // FreqH[cb]
+ 0.000000f, // FreqH[cc]
+ 0.000000f, // FreqH[cd]
+ 0.000000f, // FreqH[ce]
+ 0.000000f, // FreqH[cf]
+ 0.000000f, // FreqH[d0]
+ 0.000000f, // FreqH[d1]
+ 0.000000f, // FreqH[d2]
+ 0.000000f, // FreqH[d3]
+ 0.000000f, // FreqH[d4]
+ 0.000000f, // FreqH[d5]
+ 0.000000f, // FreqH[d6]
+ 0.000000f, // FreqH[d7]
+ 0.000000f, // FreqH[d8]
+ 0.000000f, // FreqH[d9]
+ 0.000000f, // FreqH[da]
+ 0.000000f, // FreqH[db]
+ 0.000000f, // FreqH[dc]
+ 0.000000f, // FreqH[dd]
+ 0.000000f, // FreqH[de]
+ 0.000000f, // FreqH[df]
+ 0.000000f, // FreqH[e0]
+ 0.000000f, // FreqH[e1]
+ 0.000000f, // FreqH[e2]
+ 0.000000f, // FreqH[e3]
+ 0.000000f, // FreqH[e4]
+ 0.000000f, // FreqH[e5]
+ 0.000000f, // FreqH[e6]
+ 0.000000f, // FreqH[e7]
+ 0.000000f, // FreqH[e8]
+ 0.000000f, // FreqH[e9]
+ 0.000000f, // FreqH[ea]
+ 0.000000f, // FreqH[eb]
+ 0.000000f, // FreqH[ec]
+ 0.000000f, // FreqH[ed]
+ 0.000000f, // FreqH[ee]
+ 0.000000f, // FreqH[ef]
+ 0.000000f, // FreqH[f0]
+ 0.000000f, // FreqH[f1]
+ 0.000000f, // FreqH[f2]
+ 0.000000f, // FreqH[f3]
+ 0.000000f, // FreqH[f4]
+ 0.000000f, // FreqH[f5]
+ 0.000000f, // FreqH[f6]
+ 0.000000f, // FreqH[f7]
+ 0.000000f, // FreqH[f8]
+ 0.000000f, // FreqH[f9]
+ 0.000000f, // FreqH[fa]
+ 0.000000f, // FreqH[fb]
+ 0.000000f, // FreqH[fc]
+ 0.000000f, // FreqH[fd]
+ 0.000000f // FreqH[fe]
+
+ };
+
+ mFirstByteStdDev = 0.025593f; // Lead Byte StdDev
+ mFirstByteMean = 0.010638f; // Lead Byte Mean
+ mFirstByteWeight = 0.647437f; // Lead Byte Weight
+
+ mSecondByteFreq = new float[] {
+ 0.016694f, // FreqL[a1]
+ 0.000000f, // FreqL[a2]
+ 0.012778f, // FreqL[a3]
+ 0.030091f, // FreqL[a4]
+ 0.002679f, // FreqL[a5]
+ 0.006595f, // FreqL[a6]
+ 0.001855f, // FreqL[a7]
+ 0.000824f, // FreqL[a8]
+ 0.005977f, // FreqL[a9]
+ 0.004740f, // FreqL[aa]
+ 0.003092f, // FreqL[ab]
+ 0.000824f, // FreqL[ac]
+ 0.019580f, // FreqL[ad]
+ 0.037304f, // FreqL[ae]
+ 0.008244f, // FreqL[af]
+ 0.014633f, // FreqL[b0]
+ 0.001031f, // FreqL[b1]
+ 0.000000f, // FreqL[b2]
+ 0.003298f, // FreqL[b3]
+ 0.002061f, // FreqL[b4]
+ 0.006183f, // FreqL[b5]
+ 0.005977f, // FreqL[b6]
+ 0.000824f, // FreqL[b7]
+ 0.021847f, // FreqL[b8]
+ 0.014839f, // FreqL[b9]
+ 0.052968f, // FreqL[ba]
+ 0.017312f, // FreqL[bb]
+ 0.007626f, // FreqL[bc]
+ 0.000412f, // FreqL[bd]
+ 0.000824f, // FreqL[be]
+ 0.011129f, // FreqL[bf]
+ 0.000000f, // FreqL[c0]
+ 0.000412f, // FreqL[c1]
+ 0.001649f, // FreqL[c2]
+ 0.005977f, // FreqL[c3]
+ 0.065746f, // FreqL[c4]
+ 0.020198f, // FreqL[c5]
+ 0.021434f, // FreqL[c6]
+ 0.014633f, // FreqL[c7]
+ 0.004122f, // FreqL[c8]
+ 0.001649f, // FreqL[c9]
+ 0.000824f, // FreqL[ca]
+ 0.000824f, // FreqL[cb]
+ 0.051937f, // FreqL[cc]
+ 0.019580f, // FreqL[cd]
+ 0.023289f, // FreqL[ce]
+ 0.026381f, // FreqL[cf]
+ 0.040396f, // FreqL[d0]
+ 0.009068f, // FreqL[d1]
+ 0.001443f, // FreqL[d2]
+ 0.003710f, // FreqL[d3]
+ 0.007420f, // FreqL[d4]
+ 0.001443f, // FreqL[d5]
+ 0.013190f, // FreqL[d6]
+ 0.002885f, // FreqL[d7]
+ 0.000412f, // FreqL[d8]
+ 0.003298f, // FreqL[d9]
+ 0.025969f, // FreqL[da]
+ 0.000412f, // FreqL[db]
+ 0.000412f, // FreqL[dc]
+ 0.006183f, // FreqL[dd]
+ 0.003298f, // FreqL[de]
+ 0.066983f, // FreqL[df]
+ 0.002679f, // FreqL[e0]
+ 0.002267f, // FreqL[e1]
+ 0.011129f, // FreqL[e2]
+ 0.000412f, // FreqL[e3]
+ 0.010099f, // FreqL[e4]
+ 0.015251f, // FreqL[e5]
+ 0.007626f, // FreqL[e6]
+ 0.043899f, // FreqL[e7]
+ 0.003710f, // FreqL[e8]
+ 0.002679f, // FreqL[e9]
+ 0.001443f, // FreqL[ea]
+ 0.010923f, // FreqL[eb]
+ 0.002885f, // FreqL[ec]
+ 0.009068f, // FreqL[ed]
+ 0.019992f, // FreqL[ee]
+ 0.000412f, // FreqL[ef]
+ 0.008450f, // FreqL[f0]
+ 0.005153f, // FreqL[f1]
+ 0.000000f, // FreqL[f2]
+ 0.010099f, // FreqL[f3]
+ 0.000000f, // FreqL[f4]
+ 0.001649f, // FreqL[f5]
+ 0.012160f, // FreqL[f6]
+ 0.011542f, // FreqL[f7]
+ 0.006595f, // FreqL[f8]
+ 0.001855f, // FreqL[f9]
+ 0.010923f, // FreqL[fa]
+ 0.000412f, // FreqL[fb]
+ 0.023702f, // FreqL[fc]
+ 0.003710f, // FreqL[fd]
+ 0.001855f // FreqL[fe]
+
+ };
+
+ mSecondByteStdDev = 0.013937f; // Trail Byte StdDev
+ mSecondByteMean = 0.010638f; // Trail Byte Mean
+ mSecondByteWeight = 0.352563f; // Trial Byte Weight
+ }
+
+}
diff --git a/org/mozilla/intl/chardet/EUCTWStatistics.java b/org/mozilla/intl/chardet/EUCTWStatistics.java
new file mode 100644
index 0000000..f18704a
--- /dev/null
+++ b/org/mozilla/intl/chardet/EUCTWStatistics.java
@@ -0,0 +1,253 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.* ;
+
+public class EUCTWStatistics extends nsEUCStatistics {
+
+
+ static float[] mFirstByteFreq ;
+ static float mFirstByteStdDev;
+ static float mFirstByteMean;
+ static float mFirstByteWeight;
+ static float[] mSecondByteFreq;
+ static float mSecondByteStdDev;
+ static float mSecondByteMean;
+ static float mSecondByteWeight;
+
+ public float[] mFirstByteFreq() { return mFirstByteFreq; }
+ public float mFirstByteStdDev() { return mFirstByteStdDev; }
+ public float mFirstByteMean() { return mFirstByteMean; }
+ public float mFirstByteWeight() { return mFirstByteWeight; }
+ public float[] mSecondByteFreq() { return mSecondByteFreq; }
+ public float mSecondByteStdDev() { return mSecondByteStdDev; }
+ public float mSecondByteMean() { return mSecondByteMean; }
+ public float mSecondByteWeight() { return mSecondByteWeight; }
+
+ public EUCTWStatistics() {
+
+ mFirstByteFreq = new float[] {
+ 0.000000f, // FreqH[a1]
+ 0.000000f, // FreqH[a2]
+ 0.000000f, // FreqH[a3]
+ 0.000000f, // FreqH[a4]
+ 0.000000f, // FreqH[a5]
+ 0.000000f, // FreqH[a6]
+ 0.000000f, // FreqH[a7]
+ 0.000000f, // FreqH[a8]
+ 0.000000f, // FreqH[a9]
+ 0.000000f, // FreqH[aa]
+ 0.000000f, // FreqH[ab]
+ 0.000000f, // FreqH[ac]
+ 0.000000f, // FreqH[ad]
+ 0.000000f, // FreqH[ae]
+ 0.000000f, // FreqH[af]
+ 0.000000f, // FreqH[b0]
+ 0.000000f, // FreqH[b1]
+ 0.000000f, // FreqH[b2]
+ 0.000000f, // FreqH[b3]
+ 0.000000f, // FreqH[b4]
+ 0.000000f, // FreqH[b5]
+ 0.000000f, // FreqH[b6]
+ 0.000000f, // FreqH[b7]
+ 0.000000f, // FreqH[b8]
+ 0.000000f, // FreqH[b9]
+ 0.000000f, // FreqH[ba]
+ 0.000000f, // FreqH[bb]
+ 0.000000f, // FreqH[bc]
+ 0.000000f, // FreqH[bd]
+ 0.000000f, // FreqH[be]
+ 0.000000f, // FreqH[bf]
+ 0.000000f, // FreqH[c0]
+ 0.000000f, // FreqH[c1]
+ 0.000000f, // FreqH[c2]
+ 0.000000f, // FreqH[c3]
+ 0.119286f, // FreqH[c4]
+ 0.052233f, // FreqH[c5]
+ 0.044126f, // FreqH[c6]
+ 0.052494f, // FreqH[c7]
+ 0.045906f, // FreqH[c8]
+ 0.019038f, // FreqH[c9]
+ 0.032465f, // FreqH[ca]
+ 0.026252f, // FreqH[cb]
+ 0.025502f, // FreqH[cc]
+ 0.015963f, // FreqH[cd]
+ 0.052493f, // FreqH[ce]
+ 0.019256f, // FreqH[cf]
+ 0.015137f, // FreqH[d0]
+ 0.031782f, // FreqH[d1]
+ 0.017370f, // FreqH[d2]
+ 0.018494f, // FreqH[d3]
+ 0.015575f, // FreqH[d4]
+ 0.016621f, // FreqH[d5]
+ 0.007444f, // FreqH[d6]
+ 0.011642f, // FreqH[d7]
+ 0.013916f, // FreqH[d8]
+ 0.019159f, // FreqH[d9]
+ 0.016445f, // FreqH[da]
+ 0.007851f, // FreqH[db]
+ 0.011079f, // FreqH[dc]
+ 0.022842f, // FreqH[dd]
+ 0.015513f, // FreqH[de]
+ 0.010033f, // FreqH[df]
+ 0.009950f, // FreqH[e0]
+ 0.010347f, // FreqH[e1]
+ 0.013103f, // FreqH[e2]
+ 0.015371f, // FreqH[e3]
+ 0.012502f, // FreqH[e4]
+ 0.007436f, // FreqH[e5]
+ 0.018253f, // FreqH[e6]
+ 0.014134f, // FreqH[e7]
+ 0.008907f, // FreqH[e8]
+ 0.005411f, // FreqH[e9]
+ 0.009570f, // FreqH[ea]
+ 0.013598f, // FreqH[eb]
+ 0.006092f, // FreqH[ec]
+ 0.007409f, // FreqH[ed]
+ 0.008432f, // FreqH[ee]
+ 0.005816f, // FreqH[ef]
+ 0.009349f, // FreqH[f0]
+ 0.005472f, // FreqH[f1]
+ 0.007170f, // FreqH[f2]
+ 0.007420f, // FreqH[f3]
+ 0.003681f, // FreqH[f4]
+ 0.007523f, // FreqH[f5]
+ 0.004610f, // FreqH[f6]
+ 0.006154f, // FreqH[f7]
+ 0.003348f, // FreqH[f8]
+ 0.005074f, // FreqH[f9]
+ 0.005922f, // FreqH[fa]
+ 0.005254f, // FreqH[fb]
+ 0.004682f, // FreqH[fc]
+ 0.002093f, // FreqH[fd]
+ 0.000000f // FreqH[fe]
+ };
+
+ mFirstByteStdDev = 0.016681f; // Lead Byte StdDev
+ mFirstByteMean = 0.010638f; // Lead Byte Mean
+ mFirstByteWeight = 0.715599f; // Lead Byte Weight
+
+ mSecondByteFreq = new float[] {
+ 0.028933f, // FreqL[a1]
+ 0.011371f, // FreqL[a2]
+ 0.011053f, // FreqL[a3]
+ 0.007232f, // FreqL[a4]
+ 0.010192f, // FreqL[a5]
+ 0.004093f, // FreqL[a6]
+ 0.015043f, // FreqL[a7]
+ 0.011752f, // FreqL[a8]
+ 0.022387f, // FreqL[a9]
+ 0.008410f, // FreqL[aa]
+ 0.012448f, // FreqL[ab]
+ 0.007473f, // FreqL[ac]
+ 0.003594f, // FreqL[ad]
+ 0.007139f, // FreqL[ae]
+ 0.018912f, // FreqL[af]
+ 0.006083f, // FreqL[b0]
+ 0.003302f, // FreqL[b1]
+ 0.010215f, // FreqL[b2]
+ 0.008791f, // FreqL[b3]
+ 0.024236f, // FreqL[b4]
+ 0.014107f, // FreqL[b5]
+ 0.014108f, // FreqL[b6]
+ 0.010303f, // FreqL[b7]
+ 0.009728f, // FreqL[b8]
+ 0.007877f, // FreqL[b9]
+ 0.009719f, // FreqL[ba]
+ 0.007952f, // FreqL[bb]
+ 0.021028f, // FreqL[bc]
+ 0.005764f, // FreqL[bd]
+ 0.009341f, // FreqL[be]
+ 0.006591f, // FreqL[bf]
+ 0.012517f, // FreqL[c0]
+ 0.005921f, // FreqL[c1]
+ 0.008982f, // FreqL[c2]
+ 0.008771f, // FreqL[c3]
+ 0.012802f, // FreqL[c4]
+ 0.005926f, // FreqL[c5]
+ 0.008342f, // FreqL[c6]
+ 0.003086f, // FreqL[c7]
+ 0.006843f, // FreqL[c8]
+ 0.007576f, // FreqL[c9]
+ 0.004734f, // FreqL[ca]
+ 0.016404f, // FreqL[cb]
+ 0.008803f, // FreqL[cc]
+ 0.008071f, // FreqL[cd]
+ 0.005349f, // FreqL[ce]
+ 0.008566f, // FreqL[cf]
+ 0.010840f, // FreqL[d0]
+ 0.015401f, // FreqL[d1]
+ 0.031904f, // FreqL[d2]
+ 0.008670f, // FreqL[d3]
+ 0.011479f, // FreqL[d4]
+ 0.010936f, // FreqL[d5]
+ 0.007617f, // FreqL[d6]
+ 0.008995f, // FreqL[d7]
+ 0.008114f, // FreqL[d8]
+ 0.008658f, // FreqL[d9]
+ 0.005934f, // FreqL[da]
+ 0.010452f, // FreqL[db]
+ 0.009142f, // FreqL[dc]
+ 0.004519f, // FreqL[dd]
+ 0.008339f, // FreqL[de]
+ 0.007476f, // FreqL[df]
+ 0.007027f, // FreqL[e0]
+ 0.006025f, // FreqL[e1]
+ 0.021804f, // FreqL[e2]
+ 0.024248f, // FreqL[e3]
+ 0.015895f, // FreqL[e4]
+ 0.003768f, // FreqL[e5]
+ 0.010171f, // FreqL[e6]
+ 0.010007f, // FreqL[e7]
+ 0.010178f, // FreqL[e8]
+ 0.008316f, // FreqL[e9]
+ 0.006832f, // FreqL[ea]
+ 0.006364f, // FreqL[eb]
+ 0.009141f, // FreqL[ec]
+ 0.009148f, // FreqL[ed]
+ 0.012081f, // FreqL[ee]
+ 0.011914f, // FreqL[ef]
+ 0.004464f, // FreqL[f0]
+ 0.014257f, // FreqL[f1]
+ 0.006907f, // FreqL[f2]
+ 0.011292f, // FreqL[f3]
+ 0.018622f, // FreqL[f4]
+ 0.008149f, // FreqL[f5]
+ 0.004636f, // FreqL[f6]
+ 0.006612f, // FreqL[f7]
+ 0.013478f, // FreqL[f8]
+ 0.012614f, // FreqL[f9]
+ 0.005186f, // FreqL[fa]
+ 0.048285f, // FreqL[fb]
+ 0.006816f, // FreqL[fc]
+ 0.006743f, // FreqL[fd]
+ 0.008671f // FreqL[fe]
+ };
+
+ mSecondByteStdDev = 0.006630f; // Trail Byte StdDev
+ mSecondByteMean = 0.010638f; // Trail Byte Mean
+ mSecondByteWeight = 0.284401f; // Trial Byte Weight
+ }
+
+}
diff --git a/org/mozilla/intl/chardet/GB2312Statistics.java b/org/mozilla/intl/chardet/GB2312Statistics.java
new file mode 100644
index 0000000..7abe216
--- /dev/null
+++ b/org/mozilla/intl/chardet/GB2312Statistics.java
@@ -0,0 +1,255 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.* ;
+
+public class GB2312Statistics extends nsEUCStatistics {
+
+
+ static float[] mFirstByteFreq ;
+ static float mFirstByteStdDev;
+ static float mFirstByteMean;
+ static float mFirstByteWeight;
+ static float[] mSecondByteFreq;
+ static float mSecondByteStdDev;
+ static float mSecondByteMean;
+ static float mSecondByteWeight;
+
+ public float[] mFirstByteFreq() { return mFirstByteFreq; }
+ public float mFirstByteStdDev() { return mFirstByteStdDev; }
+ public float mFirstByteMean() { return mFirstByteMean; }
+ public float mFirstByteWeight() { return mFirstByteWeight; }
+ public float[] mSecondByteFreq() { return mSecondByteFreq; }
+ public float mSecondByteStdDev() { return mSecondByteStdDev; }
+ public float mSecondByteMean() { return mSecondByteMean; }
+ public float mSecondByteWeight() { return mSecondByteWeight; }
+
+ public GB2312Statistics() {
+
+ mFirstByteFreq = new float[] {
+ 0.011628f, // FreqH[a1]
+ 0.000000f, // FreqH[a2]
+ 0.000000f, // FreqH[a3]
+ 0.000000f, // FreqH[a4]
+ 0.000000f, // FreqH[a5]
+ 0.000000f, // FreqH[a6]
+ 0.000000f, // FreqH[a7]
+ 0.000000f, // FreqH[a8]
+ 0.000000f, // FreqH[a9]
+ 0.000000f, // FreqH[aa]
+ 0.000000f, // FreqH[ab]
+ 0.000000f, // FreqH[ac]
+ 0.000000f, // FreqH[ad]
+ 0.000000f, // FreqH[ae]
+ 0.000000f, // FreqH[af]
+ 0.011628f, // FreqH[b0]
+ 0.012403f, // FreqH[b1]
+ 0.009302f, // FreqH[b2]
+ 0.003876f, // FreqH[b3]
+ 0.017829f, // FreqH[b4]
+ 0.037209f, // FreqH[b5]
+ 0.008527f, // FreqH[b6]
+ 0.010078f, // FreqH[b7]
+ 0.019380f, // FreqH[b8]
+ 0.054264f, // FreqH[b9]
+ 0.010078f, // FreqH[ba]
+ 0.041085f, // FreqH[bb]
+ 0.020930f, // FreqH[bc]
+ 0.018605f, // FreqH[bd]
+ 0.010078f, // FreqH[be]
+ 0.013178f, // FreqH[bf]
+ 0.016279f, // FreqH[c0]
+ 0.006202f, // FreqH[c1]
+ 0.009302f, // FreqH[c2]
+ 0.017054f, // FreqH[c3]
+ 0.011628f, // FreqH[c4]
+ 0.008527f, // FreqH[c5]
+ 0.004651f, // FreqH[c6]
+ 0.006202f, // FreqH[c7]
+ 0.017829f, // FreqH[c8]
+ 0.024806f, // FreqH[c9]
+ 0.020155f, // FreqH[ca]
+ 0.013953f, // FreqH[cb]
+ 0.032558f, // FreqH[cc]
+ 0.035659f, // FreqH[cd]
+ 0.068217f, // FreqH[ce]
+ 0.010853f, // FreqH[cf]
+ 0.036434f, // FreqH[d0]
+ 0.117054f, // FreqH[d1]
+ 0.027907f, // FreqH[d2]
+ 0.100775f, // FreqH[d3]
+ 0.010078f, // FreqH[d4]
+ 0.017829f, // FreqH[d5]
+ 0.062016f, // FreqH[d6]
+ 0.012403f, // FreqH[d7]
+ 0.000000f, // FreqH[d8]
+ 0.000000f, // FreqH[d9]
+ 0.000000f, // FreqH[da]
+ 0.000000f, // FreqH[db]
+ 0.000000f, // FreqH[dc]
+ 0.000000f, // FreqH[dd]
+ 0.000000f, // FreqH[de]
+ 0.000000f, // FreqH[df]
+ 0.000000f, // FreqH[e0]
+ 0.000000f, // FreqH[e1]
+ 0.000000f, // FreqH[e2]
+ 0.000000f, // FreqH[e3]
+ 0.000000f, // FreqH[e4]
+ 0.000000f, // FreqH[e5]
+ 0.000000f, // FreqH[e6]
+ 0.000000f, // FreqH[e7]
+ 0.000000f, // FreqH[e8]
+ 0.000000f, // FreqH[e9]
+ 0.001550f, // FreqH[ea]
+ 0.000000f, // FreqH[eb]
+ 0.000000f, // FreqH[ec]
+ 0.000000f, // FreqH[ed]
+ 0.000000f, // FreqH[ee]
+ 0.000000f, // FreqH[ef]
+ 0.000000f, // FreqH[f0]
+ 0.000000f, // FreqH[f1]
+ 0.000000f, // FreqH[f2]
+ 0.000000f, // FreqH[f3]
+ 0.000000f, // FreqH[f4]
+ 0.000000f, // FreqH[f5]
+ 0.000000f, // FreqH[f6]
+ 0.000000f, // FreqH[f7]
+ 0.000000f, // FreqH[f8]
+ 0.000000f, // FreqH[f9]
+ 0.000000f, // FreqH[fa]
+ 0.000000f, // FreqH[fb]
+ 0.000000f, // FreqH[fc]
+ 0.000000f, // FreqH[fd]
+ 0.000000f // FreqH[fe]
+
+ };
+
+ mFirstByteStdDev = 0.020081f; // Lead Byte StdDev
+ mFirstByteMean = 0.010638f; // Lead Byte Mean
+ mFirstByteWeight = 0.586533f; // Lead Byte Weight
+
+ mSecondByteFreq = new float[] {
+ 0.006202f, // FreqL[a1]
+ 0.031008f, // FreqL[a2]
+ 0.005426f, // FreqL[a3]
+ 0.003101f, // FreqL[a4]
+ 0.001550f, // FreqL[a5]
+ 0.003101f, // FreqL[a6]
+ 0.082171f, // FreqL[a7]
+ 0.014729f, // FreqL[a8]
+ 0.006977f, // FreqL[a9]
+ 0.001550f, // FreqL[aa]
+ 0.013953f, // FreqL[ab]
+ 0.000000f, // FreqL[ac]
+ 0.013953f, // FreqL[ad]
+ 0.010078f, // FreqL[ae]
+ 0.008527f, // FreqL[af]
+ 0.006977f, // FreqL[b0]
+ 0.004651f, // FreqL[b1]
+ 0.003101f, // FreqL[b2]
+ 0.003101f, // FreqL[b3]
+ 0.003101f, // FreqL[b4]
+ 0.008527f, // FreqL[b5]
+ 0.003101f, // FreqL[b6]
+ 0.005426f, // FreqL[b7]
+ 0.005426f, // FreqL[b8]
+ 0.005426f, // FreqL[b9]
+ 0.003101f, // FreqL[ba]
+ 0.001550f, // FreqL[bb]
+ 0.006202f, // FreqL[bc]
+ 0.014729f, // FreqL[bd]
+ 0.010853f, // FreqL[be]
+ 0.000000f, // FreqL[bf]
+ 0.011628f, // FreqL[c0]
+ 0.000000f, // FreqL[c1]
+ 0.031783f, // FreqL[c2]
+ 0.013953f, // FreqL[c3]
+ 0.030233f, // FreqL[c4]
+ 0.039535f, // FreqL[c5]
+ 0.008527f, // FreqL[c6]
+ 0.015504f, // FreqL[c7]
+ 0.000000f, // FreqL[c8]
+ 0.003101f, // FreqL[c9]
+ 0.008527f, // FreqL[ca]
+ 0.016279f, // FreqL[cb]
+ 0.005426f, // FreqL[cc]
+ 0.001550f, // FreqL[cd]
+ 0.013953f, // FreqL[ce]
+ 0.013953f, // FreqL[cf]
+ 0.044961f, // FreqL[d0]
+ 0.003101f, // FreqL[d1]
+ 0.004651f, // FreqL[d2]
+ 0.006977f, // FreqL[d3]
+ 0.001550f, // FreqL[d4]
+ 0.005426f, // FreqL[d5]
+ 0.012403f, // FreqL[d6]
+ 0.001550f, // FreqL[d7]
+ 0.015504f, // FreqL[d8]
+ 0.000000f, // FreqL[d9]
+ 0.006202f, // FreqL[da]
+ 0.001550f, // FreqL[db]
+ 0.000000f, // FreqL[dc]
+ 0.007752f, // FreqL[dd]
+ 0.006977f, // FreqL[de]
+ 0.001550f, // FreqL[df]
+ 0.009302f, // FreqL[e0]
+ 0.011628f, // FreqL[e1]
+ 0.004651f, // FreqL[e2]
+ 0.010853f, // FreqL[e3]
+ 0.012403f, // FreqL[e4]
+ 0.017829f, // FreqL[e5]
+ 0.005426f, // FreqL[e6]
+ 0.024806f, // FreqL[e7]
+ 0.000000f, // FreqL[e8]
+ 0.006202f, // FreqL[e9]
+ 0.000000f, // FreqL[ea]
+ 0.082171f, // FreqL[eb]
+ 0.015504f, // FreqL[ec]
+ 0.004651f, // FreqL[ed]
+ 0.000000f, // FreqL[ee]
+ 0.006977f, // FreqL[ef]
+ 0.004651f, // FreqL[f0]
+ 0.000000f, // FreqL[f1]
+ 0.008527f, // FreqL[f2]
+ 0.012403f, // FreqL[f3]
+ 0.004651f, // FreqL[f4]
+ 0.003876f, // FreqL[f5]
+ 0.003101f, // FreqL[f6]
+ 0.022481f, // FreqL[f7]
+ 0.024031f, // FreqL[f8]
+ 0.001550f, // FreqL[f9]
+ 0.047287f, // FreqL[fa]
+ 0.009302f, // FreqL[fb]
+ 0.001550f, // FreqL[fc]
+ 0.005426f, // FreqL[fd]
+ 0.017054f // FreqL[fe]
+
+ };
+
+ mSecondByteStdDev = 0.014156f; // Trail Byte StdDev
+ mSecondByteMean = 0.010638f; // Trail Byte Mean
+ mSecondByteWeight = 0.413467f; // Trial Byte Weight
+ }
+
+}
diff --git a/org/mozilla/intl/chardet/HtmlCharsetDetector.java b/org/mozilla/intl/chardet/HtmlCharsetDetector.java
new file mode 100644
index 0000000..897c3a8
--- /dev/null
+++ b/org/mozilla/intl/chardet/HtmlCharsetDetector.java
@@ -0,0 +1,106 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+import java.io.* ;
+import java.net.* ;
+import java.util.* ;
+import org.mozilla.intl.chardet.* ;
+
+public class HtmlCharsetDetector {
+
+ public static boolean found = false ;
+
+ public static void main(String argv[]) throws Exception {
+
+ if (argv.length != 1 && argv.length != 2) {
+
+ System.out.println(
+ "Usage: HtmlCharsetDetector <url> [<languageHint>]");
+
+ System.out.println("");
+ System.out.println("Where <url> is http://...");
+ System.out.println("For optional <languageHint>. Use following...");
+ System.out.println(" 1 => Japanese");
+ System.out.println(" 2 => Chinese");
+ System.out.println(" 3 => Simplified Chinese");
+ System.out.println(" 4 => Traditional Chinese");
+ System.out.println(" 5 => Korean");
+ System.out.println(" 6 => Dont know (default)");
+
+ return ;
+ }
+
+
+ // Initalize the nsDetector() ;
+ int lang = (argv.length == 2)? Integer.parseInt(argv[1])
+ : nsPSMDetector.ALL ;
+ nsDetector det = new nsDetector(lang) ;
+
+ // Set an observer...
+ // The Notify() will be called when a matching charset is found.
+
+ det.Init(new nsICharsetDetectionObserver() {
+ public void Notify(String charset) {
+ HtmlCharsetDetector.found = true ;
+ System.out.println("CHARSET = " + charset);
+ }
+ });
+
+ URL url = new URL(argv[0]);
+ BufferedInputStream imp = new BufferedInputStream(url.openStream());
+
+ byte[] buf = new byte[1024] ;
+ int len;
+ boolean done = false ;
+ boolean isAscii = true ;
+
+ while( (len=imp.read(buf,0,buf.length)) != -1) {
+
+ // Check if the stream is only ascii.
+ if (isAscii)
+ isAscii = det.isAscii(buf,len);
+
+ // DoIt if non-ascii and not done yet.
+ if (!isAscii && !done)
+ done = det.DoIt(buf,len, false);
+ }
+ det.DataEnd();
+
+ if (isAscii) {
+ System.out.println("CHARSET = ASCII");
+ found = true ;
+ }
+
+ if (!found) {
+ String prob[] = det.getProbableCharsets() ;
+ for(int i=0; i<prob.length; i++) {
+ System.out.println("Probable Charset = " + prob[i]);
+ }
+ }
+ }
+}
diff --git a/org/mozilla/intl/chardet/nsBIG5Verifier.java b/org/mozilla/intl/chardet/nsBIG5Verifier.java
new file mode 100644
index 0000000..e60b0f3
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsBIG5Verifier.java
@@ -0,0 +1,99 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsBIG5Verifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsBIG5Verifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 1) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (4))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 0) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+
+
+
+ states = new int[3] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)((( 3) << 4) | (eStart))) ) << 8) | ( ((int)(((eStart) << 4) | (eError))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eItsMe))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eStart))) ) << 8) | ( ((int)(((eStart) << 4) | (eError))) )))))) ;
+
+
+
+ charset = "Big5";
+ stFactor = 5;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsCP1252Verifier.java b/org/mozilla/intl/chardet/nsCP1252Verifier.java
new file mode 100644
index 0000000..6cce032
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsCP1252Verifier.java
@@ -0,0 +1,99 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsCP1252Verifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsCP1252Verifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (1))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((0) << 4) | (2))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 0) << 4) | (1))) ) << 8) | (((int)(((0) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (1))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (0))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((0) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (1))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 2) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 2) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+
+
+
+ states = new int[3] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eStart))) ) << 8) | ( ((int)((( 3) << 4) | (eError))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eError) << 4) | ( 4))) ) << 8) | (((int)((( 5) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | ( 4))) ) << 8) | ( ((int)(((eError) << 4) | (eItsMe))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eStart))) ) << 8) | ( ((int)((( 4) << 4) | (eError))) )))))) ;
+
+
+
+ charset = "windows-1252";
+ stFactor = 3;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsDetector.java b/org/mozilla/intl/chardet/nsDetector.java
new file mode 100644
index 0000000..e539ea7
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsDetector.java
@@ -0,0 +1,75 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.* ;
+
+public class nsDetector extends nsPSMDetector
+ implements nsICharsetDetector {
+
+ nsICharsetDetectionObserver mObserver = null ;
+
+ public nsDetector() {
+ super() ;
+ }
+
+ public nsDetector(int langFlag) {
+ super(langFlag) ;
+ }
+
+ public void Init(nsICharsetDetectionObserver aObserver) {
+
+ mObserver = aObserver ;
+ return ;
+
+ }
+
+ public boolean DoIt(byte[] aBuf, int aLen, boolean oDontFeedMe) {
+
+ if (aBuf == null || oDontFeedMe )
+ return false ;
+
+ this.HandleData(aBuf, aLen) ;
+ return mDone ;
+ }
+
+ public void Done() {
+ this.DataEnd() ;
+ return ;
+ }
+
+ public void Report(String charset) {
+ if (mObserver != null)
+ mObserver.Notify(charset) ;
+ }
+
+ public boolean isAscii(byte[] aBuf, int aLen) {
+
+ for(int i=0; i<aLen; i++) {
+ if ((0x0080 & aBuf[i]) != 0) {
+ return false ;
+ }
+ }
+ return true ;
+ }
+}
diff --git a/org/mozilla/intl/chardet/nsEUCJPVerifier.java b/org/mozilla/intl/chardet/nsEUCJPVerifier.java
new file mode 100644
index 0000000..dea351d
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsEUCJPVerifier.java
@@ -0,0 +1,101 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsEUCJPVerifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsEUCJPVerifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 5) << 4) | (5))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 5) << 4) | (5))) ) << 8) | (((int)(((5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (5))) ) << 8) | ( ((int)(((5) << 4) | (5))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 3) << 4) | (1))) ) << 8) | (((int)(((5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (5))) ) << 8) | ( ((int)(((5) << 4) | (5))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 5) << 4) | (5))) ) << 8) | (((int)(((5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (5))) ) << 8) | ( ((int)(((5) << 4) | (5))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 5) << 4) | (5))) ) << 8) | (((int)(((5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (5))) ) << 8) | ( ((int)(((5) << 4) | (5))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (5))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 5) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+
+
+
+ states = new int[5] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)((( 5) << 4) | ( 3))) ) << 8) | ( ((int)((( 4) << 4) | ( 3))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eStart))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[3] = ((int)((( ((int)((( ((int)((( eError) << 4) | ( 3))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eStart))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[4] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | ( 3))) )))))) ;
+
+
+
+ charset = "EUC-JP";
+ stFactor = 6;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsEUCKRVerifier.java b/org/mozilla/intl/chardet/nsEUCKRVerifier.java
new file mode 100644
index 0000000..af9cca9
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsEUCKRVerifier.java
@@ -0,0 +1,98 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsEUCKRVerifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsEUCKRVerifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (0))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((3) << 4) | (2))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 0) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+
+
+
+ states = new int[2] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | ( 3))) ) << 8) | ( ((int)(((eStart) << 4) | (eError))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eItsMe))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+
+
+
+ charset = "EUC-KR";
+ stFactor = 4;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsEUCSampler.java b/org/mozilla/intl/chardet/nsEUCSampler.java
new file mode 100644
index 0000000..3739649
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsEUCSampler.java
@@ -0,0 +1,128 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+import java.lang.* ;
+
+public class nsEUCSampler {
+
+ int mTotal = 0;
+ int mThreshold = 200 ;
+ int mState = 0;
+ public int mFirstByteCnt[] = new int[94] ;
+ public int mSecondByteCnt[] = new int[94] ;
+ public float mFirstByteFreq[] = new float[94] ;
+ public float mSecondByteFreq[] = new float[94];
+
+ public nsEUCSampler() {
+ Reset() ;
+ }
+
+ public void Reset() {
+ mTotal = 0 ;
+ mState = 0 ;
+ for(int i=0; i<94; i++)
+ mFirstByteCnt[i] = mSecondByteCnt[i] = 0 ;
+ }
+
+ boolean EnoughData() { return mTotal > mThreshold; }
+
+ boolean GetSomeData() { return mTotal > 1; }
+
+ boolean Sample(byte[] aIn, int aLen) {
+
+ if(mState == 1)
+ return false;
+
+ int p = 0;
+
+ // if(aLen + mTotal > 0x80000000)
+ // aLen = 0x80000000 - mTotal;
+
+ int i;
+ for(i=0; (i<aLen) && (1 != mState) ;i++,p++)
+ {
+ switch(mState) {
+ case 0:
+ if( ( aIn[p] & 0x0080 ) != 0 )
+ {
+ if((0xff==(0xff&aIn[p])) || ( 0xa1>(0xff&aIn[p]))) {
+ mState = 1;
+ } else {
+ mTotal++;
+ mFirstByteCnt[(0xff&aIn[p]) - 0xa1]++;
+ mState = 2;
+ }
+ }
+ break;
+ case 1:
+ break;
+ case 2:
+ if( (aIn[p] & 0x0080) != 0 )
+ {
+ if((0xff == (0xff&aIn[p]))
+ || ( 0xa1 > (0xff&aIn[p]))) {
+ mState = 1;
+ } else {
+ mTotal++;
+ mSecondByteCnt[(0xff&aIn[p]) - 0xa1]++;
+ mState = 0;
+ }
+ } else {
+ mState = 1;
+ }
+ break;
+ default:
+ mState = 1;
+ }
+ }
+ return (1 != mState );
+ }
+
+
+ void CalFreq() {
+ for(int i = 0 ; i < 94; i++) {
+ mFirstByteFreq[i] = (float)mFirstByteCnt[i] / (float)mTotal;
+ mSecondByteFreq[i] = (float)mSecondByteCnt[i] / (float)mTotal;
+ }
+ }
+
+ float GetScore(float[] aFirstByteFreq, float aFirstByteWeight,
+ float[] aSecondByteFreq, float aSecondByteWeight)
+ {
+ return aFirstByteWeight * GetScore(aFirstByteFreq, mFirstByteFreq) +
+ aSecondByteWeight * GetScore(aSecondByteFreq, mSecondByteFreq);
+ }
+
+ float GetScore(float[] array1, float[] array2) {
+ float s;
+ float sum=0.0f;
+
+ for(int i=0;i<94;i++) {
+ s = array1[i] - array2[i];
+ sum += s * s;
+ }
+ return (float)java.lang.Math.sqrt((double)sum) / 94.0f;
+ }
+}
+
+
diff --git a/org/mozilla/intl/chardet/nsEUCStatistics.java b/org/mozilla/intl/chardet/nsEUCStatistics.java
new file mode 100644
index 0000000..62fbf35
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsEUCStatistics.java
@@ -0,0 +1,41 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public abstract class nsEUCStatistics {
+
+ public abstract float[] mFirstByteFreq() ;
+ public abstract float mFirstByteStdDev();
+ public abstract float mFirstByteMean();
+ public abstract float mFirstByteWeight();
+ public abstract float[] mSecondByteFreq();
+ public abstract float mSecondByteStdDev();
+ public abstract float mSecondByteMean();
+ public abstract float mSecondByteWeight();
+
+ public nsEUCStatistics() {
+ }
+
+}
diff --git a/org/mozilla/intl/chardet/nsEUCTWVerifier.java b/org/mozilla/intl/chardet/nsEUCTWVerifier.java
new file mode 100644
index 0000000..4b258df
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsEUCTWVerifier.java
@@ -0,0 +1,102 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsEUCTWVerifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsEUCTWVerifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 0) << 4) | (6))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((3) << 4) | (0))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((5) << 4) | (5))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (3))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 0) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+
+
+
+ states = new int[6] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | ( 4))) ) << 8) | (((int)((( 3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)((( 3) << 4) | (eStart))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eStart))) ) << 8) | (((int)(((eError) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eItsMe))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[3] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eStart))) ) << 8) | ( ((int)(((eStart) << 4) | (eStart))) )))))) ;
+ states[4] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eError) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | ( 5))) )))))) ;
+ states[5] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eStart))) ) << 8) | ( ((int)(((eError) << 4) | (eStart))) )))))) ;
+
+
+
+ charset = "x-euc-tw";
+ stFactor = 7;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsGB18030Verifier.java b/org/mozilla/intl/chardet/nsGB18030Verifier.java
new file mode 100644
index 0000000..4b02548
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsGB18030Verifier.java
@@ -0,0 +1,102 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsGB18030Verifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsGB18030Verifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 4) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (5))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 0) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+
+
+
+ states = new int[6] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | ( 3))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eStart))) ) << 8) | ( ((int)(((eStart) << 4) | (eError))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eItsMe))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[3] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eStart))) ) << 8) | ( ((int)(((eError) << 4) | ( 4))) )))))) ;
+ states[4] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eItsMe))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | ( 5))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[5] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eStart))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+
+
+
+ charset = "GB18030";
+ stFactor = 7;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsGB2312Verifier.java b/org/mozilla/intl/chardet/nsGB2312Verifier.java
new file mode 100644
index 0000000..49f4b38
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsGB2312Verifier.java
@@ -0,0 +1,98 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsGB2312Verifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsGB2312Verifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (0))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 0) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+
+
+
+ states = new int[2] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | ( 3))) ) << 8) | ( ((int)(((eStart) << 4) | (eError))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eItsMe))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+
+
+
+ charset = "GB2312";
+ stFactor = 4;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsHZVerifier.java b/org/mozilla/intl/chardet/nsHZVerifier.java
new file mode 100644
index 0000000..0ce022b
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsHZVerifier.java
@@ -0,0 +1,102 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsHZVerifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsHZVerifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (1))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 0) << 4) | (2))) ) << 8) | (((int)(((5) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+
+
+
+ states = new int[6] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | ( 3))) ) << 8) | ( ((int)(((eError) << 4) | (eStart))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eError) << 4) | ( 4))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[3] = ((int)((( ((int)((( ((int)((( eError) << 4) | ( 4))) ) << 8) | (((int)((( 5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | ( 6))) ) << 8) | ( ((int)(((eError) << 4) | ( 5))) )))))) ;
+ states[4] = ((int)((( ((int)((( ((int)((( eError) << 4) | ( 4))) ) << 8) | (((int)(((eError) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)((( 4) << 4) | ( 4))) ) << 8) | ( ((int)(((eError) << 4) | ( 4))) )))))) ;
+ states[5] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eStart))) ) << 8) | ( ((int)(((eItsMe) << 4) | ( 4))) )))))) ;
+
+
+
+ charset = "HZ-GB-2312";
+ stFactor = 6;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsICharsetDetectionObserver.java b/org/mozilla/intl/chardet/nsICharsetDetectionObserver.java
new file mode 100644
index 0000000..2ba40b1
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsICharsetDetectionObserver.java
@@ -0,0 +1,32 @@
+
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.* ;
+
+public interface nsICharsetDetectionObserver {
+
+ public void Notify(String charset) ;
+}
+
diff --git a/org/mozilla/intl/chardet/nsICharsetDetector.java b/org/mozilla/intl/chardet/nsICharsetDetector.java
new file mode 100644
index 0000000..3c91e0a
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsICharsetDetector.java
@@ -0,0 +1,34 @@
+
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.* ;
+
+public interface nsICharsetDetector {
+
+ public void Init(nsICharsetDetectionObserver observer) ;
+ public boolean DoIt(byte[] aBuf, int aLen, boolean oDontFeedMe) ;
+ public void Done() ;
+}
+
diff --git a/org/mozilla/intl/chardet/nsISO2022CNVerifier.java b/org/mozilla/intl/chardet/nsISO2022CNVerifier.java
new file mode 100644
index 0000000..c273761
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsISO2022CNVerifier.java
@@ -0,0 +1,104 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsISO2022CNVerifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsISO2022CNVerifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (2))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((3) << 4) | (0))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+
+
+
+ states = new int[8] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eError))) ) << 8) | ( ((int)((( 3) << 4) | (eStart))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eStart))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eItsMe))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[3] = ((int)((( ((int)((( ((int)((( eError) << 4) | ( 4))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eItsMe))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[4] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[5] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)((( 6) << 4) | ( 5))) )))))) ;
+ states[6] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[7] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eError))) ) << 8) | (((int)(((eItsMe) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+
+
+
+ charset = "ISO-2022-CN";
+ stFactor = 9;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsISO2022JPVerifier.java b/org/mozilla/intl/chardet/nsISO2022JPVerifier.java
new file mode 100644
index 0000000..417e180
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsISO2022JPVerifier.java
@@ -0,0 +1,102 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsISO2022JPVerifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsISO2022JPVerifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (2))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 7))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (3))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (4))) ) << 8) | ( ((int)(((0) << 4) | (6))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (5))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+
+
+
+ states = new int[6] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eError))) ) << 8) | ( ((int)((( 3) << 4) | (eStart))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eItsMe))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[3] = ((int)((( ((int)((( ((int)((( 4) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)((( 5) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[4] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eItsMe))) ) << 8) | (((int)(((eError) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[5] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+
+
+
+ charset = "ISO-2022-JP";
+ stFactor = 8;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsISO2022KRVerifier.java b/org/mozilla/intl/chardet/nsISO2022KRVerifier.java
new file mode 100644
index 0000000..2036633
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsISO2022KRVerifier.java
@@ -0,0 +1,101 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsISO2022KRVerifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsISO2022KRVerifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (2))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((4) << 4) | (0))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+
+
+
+ states = new int[5] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eError))) ) << 8) | ( ((int)((( 3) << 4) | (eStart))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 4) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[3] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[4] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+
+
+
+ charset = "ISO-2022-KR";
+ stFactor = 6;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsPSMDetector.java b/org/mozilla/intl/chardet/nsPSMDetector.java
new file mode 100644
index 0000000..f6f6780
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsPSMDetector.java
@@ -0,0 +1,410 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+import java.lang.* ;
+
+public abstract class nsPSMDetector {
+
+ public static final int ALL = 0 ;
+ public static final int JAPANESE = 1 ;
+ public static final int CHINESE = 2 ;
+ public static final int SIMPLIFIED_CHINESE = 3 ;
+ public static final int TRADITIONAL_CHINESE = 4 ;
+ public static final int KOREAN = 5 ;
+
+ public static final int NO_OF_LANGUAGES = 6 ;
+ public static final int MAX_VERIFIERS = 16 ;
+
+ nsVerifier[] mVerifier ;
+ nsEUCStatistics[] mStatisticsData ;
+
+ nsEUCSampler mSampler = new nsEUCSampler() ;
+ byte[] mState = new byte[MAX_VERIFIERS] ;
+ int[] mItemIdx = new int[MAX_VERIFIERS] ;
+
+ int mItems ;
+ int mClassItems ;
+
+ boolean mDone ;
+ boolean mRunSampler ;
+ boolean mClassRunSampler ;
+
+ public nsPSMDetector() {
+ initVerifiers( nsPSMDetector.ALL );
+ Reset() ;
+ }
+
+ public nsPSMDetector(int langFlag) {
+ initVerifiers(langFlag);
+ Reset() ;
+ }
+
+ public nsPSMDetector(int aItems, nsVerifier[] aVerifierSet,
+ nsEUCStatistics[] aStatisticsSet) {
+ mClassRunSampler = ( aStatisticsSet != null ) ;
+ mStatisticsData = aStatisticsSet ;
+ mVerifier = aVerifierSet ;
+
+ mClassItems = aItems ;
+ Reset() ;
+ }
+
+
+ public void Reset() {
+ mRunSampler = mClassRunSampler ;
+ mDone = false ;
+ mItems = mClassItems ;
+
+ for(int i=0; i<mItems; i++) {
+ mState[i] = 0;
+ mItemIdx[i] = i;
+ }
+
+ mSampler.Reset() ;
+ }
+
+ protected void initVerifiers(int currVerSet) {
+
+ int idx = 0 ;
+ int currVerifierSet ;
+
+ if (currVerSet >=0 && currVerSet < NO_OF_LANGUAGES ) {
+ currVerifierSet = currVerSet ;
+ }
+ else {
+ currVerifierSet = nsPSMDetector.ALL ;
+ }
+
+ mVerifier = null ;
+ mStatisticsData = null ;
+
+ if ( currVerifierSet == nsPSMDetector.TRADITIONAL_CHINESE ) {
+
+ mVerifier = new nsVerifier[] {
+ new nsUTF8Verifier(),
+ new nsBIG5Verifier(),
+ new nsISO2022CNVerifier(),
+ new nsEUCTWVerifier(),
+ new nsCP1252Verifier(),
+ new nsUCS2BEVerifier(),
+ new nsUCS2LEVerifier()
+ };
+
+ mStatisticsData = new nsEUCStatistics[] {
+ null,
+ new Big5Statistics(),
+ null,
+ new EUCTWStatistics(),
+ null,
+ null,
+ null
+ };
+ }
+
+ //==========================================================
+ else if ( currVerifierSet == nsPSMDetector.KOREAN ) {
+
+ mVerifier = new nsVerifier[] {
+ new nsUTF8Verifier(),
+ new nsEUCKRVerifier(),
+ new nsISO2022KRVerifier(),
+ new nsCP1252Verifier(),
+ new nsUCS2BEVerifier(),
+ new nsUCS2LEVerifier()
+ };
+ }
+
+ //==========================================================
+ else if ( currVerifierSet == nsPSMDetector.SIMPLIFIED_CHINESE ) {
+
+ mVerifier = new nsVerifier[] {
+ new nsUTF8Verifier(),
+ new nsGB2312Verifier(),
+ new nsGB18030Verifier(),
+ new nsISO2022CNVerifier(),
+ new nsHZVerifier(),
+ new nsCP1252Verifier(),
+ new nsUCS2BEVerifier(),
+ new nsUCS2LEVerifier()
+ };
+ }
+
+ //==========================================================
+ else if ( currVerifierSet == nsPSMDetector.JAPANESE ) {
+
+ mVerifier = new nsVerifier[] {
+ new nsUTF8Verifier(),
+ new nsSJISVerifier(),
+ new nsEUCJPVerifier(),
+ new nsISO2022JPVerifier(),
+ new nsCP1252Verifier(),
+ new nsUCS2BEVerifier(),
+ new nsUCS2LEVerifier()
+ };
+ }
+ //==========================================================
+ else if ( currVerifierSet == nsPSMDetector.CHINESE ) {
+
+ mVerifier = new nsVerifier[] {
+ new nsUTF8Verifier(),
+ new nsGB2312Verifier(),
+ new nsGB18030Verifier(),
+ new nsBIG5Verifier(),
+ new nsISO2022CNVerifier(),
+ new nsHZVerifier(),
+ new nsEUCTWVerifier(),
+ new nsCP1252Verifier(),
+ new nsUCS2BEVerifier(),
+ new nsUCS2LEVerifier()
+ };
+
+ mStatisticsData = new nsEUCStatistics[] {
+ null,
+ new GB2312Statistics(),
+ null,
+ new Big5Statistics(),
+ null,
+ null,
+ new EUCTWStatistics(),
+ null,
+ null,
+ null
+ };
+ }
+
+ //==========================================================
+ else if ( currVerifierSet == nsPSMDetector.ALL ) {
+
+ mVerifier = new nsVerifier[] {
+ new nsUTF8Verifier(),
+ new nsSJISVerifier(),
+ new nsEUCJPVerifier(),
+ new nsISO2022JPVerifier(),
+ new nsEUCKRVerifier(),
+ new nsISO2022KRVerifier(),
+ new nsBIG5Verifier(),
+ new nsEUCTWVerifier(),
+ new nsGB2312Verifier(),
+ new nsGB18030Verifier(),
+ new nsISO2022CNVerifier(),
+ new nsHZVerifier(),
+ new nsCP1252Verifier(),
+ new nsUCS2BEVerifier(),
+ new nsUCS2LEVerifier()
+ };
+
+ mStatisticsData = new nsEUCStatistics[] {
+ null,
+ null,
+ new EUCJPStatistics(),
+ null,
+ new EUCKRStatistics(),
+ null,
+ new Big5Statistics(),
+ new EUCTWStatistics(),
+ new GB2312Statistics(),
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ };
+ }
+
+ mClassRunSampler = ( mStatisticsData != null ) ;
+ mClassItems = mVerifier.length ;
+
+ }
+
+ public abstract void Report(String charset) ;
+
+ public boolean HandleData(byte[] aBuf, int len) {
+
+
+ int i,j;
+ byte b, st;
+
+ for( i=0; i < len; i++) {
+ b = aBuf[i] ;
+
+ for (j=0; j < mItems; )
+ {
+ st = nsVerifier.getNextState( mVerifier[mItemIdx[j]],
+ b, mState[j]) ;
+//if (st != 0)
+//System.out.println( "state(0x" + Integer.toHexString(0xFF&b) +") =>"+ Integer.toHexString(st&0xFF)+ " " + mVerifier[mItemIdx[j]].charset());
+
+ if (st == nsVerifier.eItsMe) {
+
+//System.out.println( "eItsMe(0x" + Integer.toHexString(0xFF&b) +") =>"+ mVerifier[mItemIdx[j]].charset());
+
+ Report( mVerifier[mItemIdx[j]].charset() );
+ mDone = true ;
+ return mDone ;
+
+ } else if (st == nsVerifier.eError ) {
+
+//System.out.println( "eNotMe(0x" + Integer.toHexString(0xFF&b) +") =>"+ mVerifier[mItemIdx[j]].charset());
+ mItems--;
+ if (j < mItems ) {
+ mItemIdx[j] = mItemIdx[mItems];
+ mState[j] = mState[mItems];
+ }
+
+ } else {
+
+ mState[j++] = st ;
+
+ }
+ }
+
+ if ( mItems <= 1 ) {
+
+ if( 1 == mItems) {
+ Report( mVerifier[mItemIdx[0]].charset() );
+ }
+ mDone = true ;
+ return mDone ;
+
+ }
+ else {
+
+ int nonUCS2Num=0;
+ int nonUCS2Idx=0;
+
+ for(j=0; j<mItems; j++) {
+ if ( (!(mVerifier[mItemIdx[j]].isUCS2())) &&
+ (!(mVerifier[mItemIdx[j]].isUCS2())) )
+ {
+ nonUCS2Num++ ;
+ nonUCS2Idx = j ;
+ }
+ }
+
+ if (1 == nonUCS2Num) {
+ Report( mVerifier[mItemIdx[nonUCS2Idx]].charset() );
+ mDone = true ;
+ return mDone ;
+ }
+ }
+
+
+ } // End of for( i=0; i < len ...
+
+ if (mRunSampler)
+ Sample(aBuf, len);
+
+ return mDone ;
+ }
+
+
+ public void DataEnd() {
+
+ if (mDone == true)
+ return ;
+
+ if (mItems == 2) {
+ if ((mVerifier[mItemIdx[0]].charset()).equals("GB18030")) {
+ Report(mVerifier[mItemIdx[1]].charset()) ;
+ mDone = true ;
+ } else if ((mVerifier[mItemIdx[1]].charset()).equals("GB18030")) {
+ Report(mVerifier[mItemIdx[0]].charset()) ;
+ mDone = true ;
+ }
+ }
+
+ if (mRunSampler)
+ Sample(null, 0, true);
+ }
+
+ public void Sample(byte[] aBuf, int aLen) {
+ Sample(aBuf, aLen, false) ;
+ }
+
+ public void Sample(byte[] aBuf, int aLen, boolean aLastChance)
+ {
+ int possibleCandidateNum = 0;
+ int j;
+ int eucNum=0 ;
+
+ for (j=0; j< mItems; j++) {
+ if (null != mStatisticsData[mItemIdx[j]])
+ eucNum++ ;
+ if ((!mVerifier[mItemIdx[j]].isUCS2()) &&
+ (!(mVerifier[mItemIdx[j]].charset()).equals("GB18030")))
+ possibleCandidateNum++ ;
+ }
+
+ mRunSampler = (eucNum > 1) ;
+
+ if (mRunSampler) {
+ mRunSampler = mSampler.Sample(aBuf, aLen);
+ if(((aLastChance && mSampler.GetSomeData()) ||
+ mSampler.EnoughData())
+ && (eucNum == possibleCandidateNum)) {
+ mSampler.CalFreq();
+
+ int bestIdx = -1;
+ int eucCnt=0;
+ float bestScore = 0.0f;
+ for(j = 0; j < mItems; j++) {
+ if((null != mStatisticsData[mItemIdx[j]]) &&
+ (!(mVerifier[mItemIdx[j]].charset()).equals("Big5")))
+ {
+ float score = mSampler.GetScore(
+ mStatisticsData[mItemIdx[j]].mFirstByteFreq(),
+ mStatisticsData[mItemIdx[j]].mFirstByteWeight(),
+ mStatisticsData[mItemIdx[j]].mSecondByteFreq(),
+ mStatisticsData[mItemIdx[j]].mSecondByteWeight() );
+//System.out.println("FequencyScore("+mVerifier[mItemIdx[j]].charset()+")= "+ score);
+ if(( 0 == eucCnt++) || (bestScore > score )) {
+ bestScore = score;
+ bestIdx = j;
+ } // if(( 0 == eucCnt++) || (bestScore > score ))
+ } // if(null != ...)
+ } // for
+ if (bestIdx >= 0)
+ {
+ Report( mVerifier[mItemIdx[bestIdx]].charset());
+ mDone = true;
+ }
+ } // if (eucNum == possibleCandidateNum)
+ } // if(mRunSampler)
+ }
+
+ public String[] getProbableCharsets() {
+
+ if (mItems <= 0) {
+ String[] nomatch = new String[1];
+ nomatch[0] = "nomatch" ;
+ return nomatch ;
+ }
+
+ String ret[] = new String[mItems] ;
+ for (int i=0; i<mItems; i++)
+ ret[i] = mVerifier[mItemIdx[i]].charset() ;
+ return ret ;
+ }
+
+}
diff --git a/org/mozilla/intl/chardet/nsSJISVerifier.java b/org/mozilla/intl/chardet/nsSJISVerifier.java
new file mode 100644
index 0000000..551ed63
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsSJISVerifier.java
@@ -0,0 +1,99 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsSJISVerifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsSJISVerifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (0))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 1) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (4))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 2) << 4) | (2))) ) << 8) | (((int)(((2) << 4) | ( 2))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (3))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+
+
+
+ states = new int[3] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)((( 3) << 4) | (eStart))) ) << 8) | ( ((int)(((eStart) << 4) | (eError))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+
+
+
+ charset = "Shift_JIS";
+ stFactor = 6;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsUCS2BEVerifier.java b/org/mozilla/intl/chardet/nsUCS2BEVerifier.java
new file mode 100644
index 0000000..794e650
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsUCS2BEVerifier.java
@@ -0,0 +1,103 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsUCS2BEVerifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsUCS2BEVerifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((2) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (1))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (0))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 5) << 4) | (4))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+
+
+
+ states = new int[7] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 3) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | ( 7))) ) << 8) | ( ((int)((( 7) << 4) | ( 5))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)((( 6) << 4) | ( 6))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[3] = ((int)((( ((int)((( ((int)((( 6) << 4) | ( 6))) ) << 8) | (((int)(((eItsMe) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)((( 6) << 4) | ( 6))) ) << 8) | ( ((int)((( 6) << 4) | ( 6))) )))))) ;
+ states[4] = ((int)((( ((int)((( ((int)((( eError) << 4) | ( 7))) ) << 8) | (((int)((( 7) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)((( 6) << 4) | ( 6))) ) << 8) | ( ((int)((( 6) << 4) | ( 6))) )))))) ;
+ states[5] = ((int)((( ((int)((( ((int)((( 6) << 4) | ( 6))) ) << 8) | (((int)((( 6) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)((( 6) << 4) | ( 6))) ) << 8) | ( ((int)((( 8) << 4) | ( 5))) )))))) ;
+ states[6] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)((( 6) << 4) | ( 6))) ) << 8) | ( ((int)((( 6) << 4) | ( 6))) )))))) ;
+
+
+
+ charset = "UTF-16BE";
+ stFactor = 6;
+
+ }
+
+ public boolean isUCS2() { return true; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsUCS2LEVerifier.java b/org/mozilla/intl/chardet/nsUCS2LEVerifier.java
new file mode 100644
index 0000000..a6e64d4
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsUCS2LEVerifier.java
@@ -0,0 +1,103 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsUCS2LEVerifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsUCS2LEVerifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((2) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (1))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((3) << 4) | (3))) ) << 8) | ( ((int)(((3) << 4) | (0))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 5) << 4) | (4))) ) << 8) | (((int)(((0) << 4) | ( 0))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (0))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+
+
+
+ states = new int[7] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 3) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)((( 6) << 4) | ( 7))) ) << 8) | ( ((int)((( 6) << 4) | ( 6))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eItsMe))) ) << 8) | (((int)(((eError) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)((( 5) << 4) | ( 5))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[3] = ((int)((( ((int)((( ((int)((( 6) << 4) | ( 6))) ) << 8) | (((int)(((eError) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | ( 5))) ) << 8) | ( ((int)((( 5) << 4) | ( 5))) )))))) ;
+ states[4] = ((int)((( ((int)((( ((int)((( eError) << 4) | ( 5))) ) << 8) | (((int)((( 5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)((( 8) << 4) | ( 8))) ) << 8) | ( ((int)((( 6) << 4) | ( 7))) )))))) ;
+ states[5] = ((int)((( ((int)((( ((int)((( 5) << 4) | ( 5))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | ( 5))) ) << 8) | ( ((int)((( 5) << 4) | ( 5))) )))))) ;
+ states[6] = ((int)((( ((int)((( ((int)((( eStart) << 4) | (eStart))) ) << 8) | (((int)(((eError) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | ( 5))) ) << 8) | ( ((int)((( 5) << 4) | ( 5))) )))))) ;
+
+
+
+ charset = "UTF-16LE";
+ stFactor = 6;
+
+ }
+
+ public boolean isUCS2() { return true; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsUTF8Verifier.java b/org/mozilla/intl/chardet/nsUTF8Verifier.java
new file mode 100644
index 0000000..43b79fc
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsUTF8Verifier.java
@@ -0,0 +1,122 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+/*
+ * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
+ * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
+ * AutoDetect/tools/
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public class nsUTF8Verifier extends nsVerifier {
+
+ static int[] cclass ;
+ static int[] states ;
+ static int stFactor ;
+ static String charset ;
+
+ public int[] cclass() { return cclass ; }
+ public int[] states() { return states ; }
+ public int stFactor() { return stFactor ; }
+ public String charset() { return charset ; }
+
+ public nsUTF8Verifier() {
+
+ cclass = new int[256/8] ;
+
+ cclass[0] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[1] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[2] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[3] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((0) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[4] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[5] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[6] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[7] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[8] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[9] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[10] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[11] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[12] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[13] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[14] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[15] = ((int)((( ((int)((( ((int)((( 1) << 4) | (1))) ) << 8) | (((int)(((1) << 4) | ( 1))) ))) ) << 16) | ( ((int)((( ((int)(((1) << 4) | (1))) ) << 8) | ( ((int)(((1) << 4) | (1))) )))))) ;
+ cclass[16] = ((int)((( ((int)((( ((int)((( 3) << 4) | (3))) ) << 8) | (((int)(((3) << 4) | ( 3))) ))) ) << 16) | ( ((int)((( ((int)(((2) << 4) | (2))) ) << 8) | ( ((int)(((2) << 4) | (2))) )))))) ;
+ cclass[17] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[18] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[19] = ((int)((( ((int)((( ((int)((( 4) << 4) | (4))) ) << 8) | (((int)(((4) << 4) | ( 4))) ))) ) << 16) | ( ((int)((( ((int)(((4) << 4) | (4))) ) << 8) | ( ((int)(((4) << 4) | (4))) )))))) ;
+ cclass[20] = ((int)((( ((int)((( ((int)((( 5) << 4) | (5))) ) << 8) | (((int)(((5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (5))) ) << 8) | ( ((int)(((5) << 4) | (5))) )))))) ;
+ cclass[21] = ((int)((( ((int)((( ((int)((( 5) << 4) | (5))) ) << 8) | (((int)(((5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (5))) ) << 8) | ( ((int)(((5) << 4) | (5))) )))))) ;
+ cclass[22] = ((int)((( ((int)((( ((int)((( 5) << 4) | (5))) ) << 8) | (((int)(((5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (5))) ) << 8) | ( ((int)(((5) << 4) | (5))) )))))) ;
+ cclass[23] = ((int)((( ((int)((( ((int)((( 5) << 4) | (5))) ) << 8) | (((int)(((5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)(((5) << 4) | (5))) ) << 8) | ( ((int)(((5) << 4) | (5))) )))))) ;
+ cclass[24] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((0) << 4) | (0))) )))))) ;
+ cclass[25] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[26] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[27] = ((int)((( ((int)((( ((int)((( 6) << 4) | (6))) ) << 8) | (((int)(((6) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)(((6) << 4) | (6))) ) << 8) | ( ((int)(((6) << 4) | (6))) )))))) ;
+ cclass[28] = ((int)((( ((int)((( ((int)((( 8) << 4) | (8))) ) << 8) | (((int)(((8) << 4) | ( 8))) ))) ) << 16) | ( ((int)((( ((int)(((8) << 4) | (8))) ) << 8) | ( ((int)(((8) << 4) | (7))) )))))) ;
+ cclass[29] = ((int)((( ((int)((( ((int)((( 8) << 4) | (8))) ) << 8) | (((int)(((9) << 4) | ( 8))) ))) ) << 16) | ( ((int)((( ((int)(((8) << 4) | (8))) ) << 8) | ( ((int)(((8) << 4) | (8))) )))))) ;
+ cclass[30] = ((int)((( ((int)((( ((int)((( 11) << 4) | (11))) ) << 8) | (((int)(((11) << 4) | ( 11))) ))) ) << 16) | ( ((int)((( ((int)(((11) << 4) | (11))) ) << 8) | ( ((int)(((11) << 4) | (10))) )))))) ;
+ cclass[31] = ((int)((( ((int)((( ((int)((( 0) << 4) | (0))) ) << 8) | (((int)(((15) << 4) | ( 14))) ))) ) << 16) | ( ((int)((( ((int)(((13) << 4) | (13))) ) << 8) | ( ((int)(((13) << 4) | (12))) )))))) ;
+
+
+
+ states = new int[26] ;
+
+ states[0] = ((int)((( ((int)((( ((int)((( 10) << 4) | ( 12))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eStart) << 4) | (eError))) )))))) ;
+ states[1] = ((int)((( ((int)((( ((int)((( 3) << 4) | ( 4))) ) << 8) | (((int)((( 5) << 4) | ( 6))) ))) ) << 16) | ( ((int)((( ((int)((( 7) << 4) | ( 8))) ) << 8) | ( ((int)((( 11) << 4) | ( 9))) )))))) ;
+ states[2] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[3] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[4] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eItsMe))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[5] = ((int)((( ((int)((( ((int)((( eItsMe) << 4) | (eItsMe))) ) << 8) | (((int)(((eItsMe) << 4) | ( eItsMe))) ))) ) << 16) | ( ((int)((( ((int)(((eItsMe) << 4) | (eItsMe))) ) << 8) | ( ((int)(((eItsMe) << 4) | (eItsMe))) )))))) ;
+ states[6] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)((( 5) << 4) | ( 5))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[7] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[8] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 5) << 4) | ( 5))) ))) ) << 16) | ( ((int)((( ((int)((( 5) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[9] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[10] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 7) << 4) | ( 7))) ))) ) << 16) | ( ((int)((( ((int)((( 7) << 4) | ( 7))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[11] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[12] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 7) << 4) | ( 7))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[13] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[14] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 9) << 4) | ( 9))) ))) ) << 16) | ( ((int)((( ((int)((( 9) << 4) | ( 9))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[15] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[16] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 9) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[17] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[18] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 12) << 4) | ( 12))) ))) ) << 16) | ( ((int)((( ((int)((( 12) << 4) | ( 12))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[19] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[20] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)((( 12) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[21] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[22] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( 12))) ))) ) << 16) | ( ((int)((( ((int)((( 12) << 4) | ( 12))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[23] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[24] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eStart) << 4) | ( eStart))) ))) ) << 16) | ( ((int)((( ((int)(((eStart) << 4) | (eStart))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+ states[25] = ((int)((( ((int)((( ((int)((( eError) << 4) | (eError))) ) << 8) | (((int)(((eError) << 4) | ( eError))) ))) ) << 16) | ( ((int)((( ((int)(((eError) << 4) | (eError))) ) << 8) | ( ((int)(((eError) << 4) | (eError))) )))))) ;
+
+
+
+ charset = "UTF-8";
+ stFactor = 16;
+
+ }
+
+ public boolean isUCS2() { return false; } ;
+
+
+}
diff --git a/org/mozilla/intl/chardet/nsVerifier.java b/org/mozilla/intl/chardet/nsVerifier.java
new file mode 100644
index 0000000..316127c
--- /dev/null
+++ b/org/mozilla/intl/chardet/nsVerifier.java
@@ -0,0 +1,64 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+package org.mozilla.intl.chardet ;
+
+import java.lang.*;
+
+public abstract class nsVerifier {
+
+ static final byte eStart = (byte)0;
+ static final byte eError = (byte)1;
+ static final byte eItsMe = (byte)2;
+ static final int eidxSft4bits = 3;
+ static final int eSftMsk4bits = 7;
+ static final int eBitSft4bits = 2;
+ static final int eUnitMsk4bits = 0x0000000F;
+
+ nsVerifier() {
+ }
+
+ public abstract String charset() ;
+ public abstract int stFactor() ;
+ public abstract int[] cclass() ;
+ public abstract int[] states() ;
+
+ public abstract boolean isUCS2() ;
+
+ public static byte getNextState(nsVerifier v, byte b, byte s) {
+
+ return (byte) ( 0xFF &
+ (((v.states()[((
+ (s*v.stFactor()+(((v.cclass()[((b&0xFF)>>v.eidxSft4bits)])
+ >> ((b & v.eSftMsk4bits) << v.eBitSft4bits))
+ & v.eUnitMsk4bits ))&0xFF)
+ >> v.eidxSft4bits) ]) >> (((
+ (s*v.stFactor()+(((v.cclass()[((b&0xFF)>>v.eidxSft4bits)])
+ >> ((b & v.eSftMsk4bits) << v.eBitSft4bits))
+ & v.eUnitMsk4bits ))&0xFF)
+ & v.eSftMsk4bits) << v.eBitSft4bits)) & v.eUnitMsk4bits )
+ ) ;
+
+ }
+
+
+}
diff --git a/src.zip b/src.zip
deleted file mode 100644
index 9cedddc..0000000
--- a/src.zip
+++ /dev/null
Binary files differ