--- a/.hgtags Tue Jul 08 09:27:08 2008 -0700
+++ b/.hgtags Wed Jul 09 10:04:09 2008 -0700
@@ -4,3 +4,4 @@ 3e599d98875ddf919c8ea11cff9b3a99ba631a9b
3e599d98875ddf919c8ea11cff9b3a99ba631a9b jdk7-b27
02e4c5348592a8d7fc2cba28bc5f8e35c0e17277 jdk7-b28
e21f4266466cd1306b176aaa08b2cd8337a9be3d jdk7-b29
+b6d6877c1155621a175dccd12dc14c54f938fb8b jdk7-b30
--- a/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java Tue Jul 08 09:27:08 2008 -0700
+++ b/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java Wed Jul 09 10:04:09 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1145,6 +1145,10 @@ public class Krb5LoginModule implements
sharedState.put(NAME, username);
sharedState.put(PWD, password);
}
+ } else {
+ // remove temp results for the next try
+ encKeys = null;
+ principal = null;
}
username = null;
password = null;
--- a/src/share/classes/java/nio/charset/Charset.java Tue Jul 08 09:27:08 2008 -0700
+++ b/src/share/classes/java/nio/charset/Charset.java Wed Jul 09 10:04:09 2008 -0700
@@ -188,21 +188,22 @@ import sun.security.action.GetPropertyAc
* <ul>
*
* <li><p> When decoding, the <tt>UTF-16BE</tt> and <tt>UTF-16LE</tt>
- * charsets ignore byte-order marks; when encoding, they do not write
+ * charsets interpret the initial byte-order marks as a <small>ZERO-WIDTH
+ * NON-BREAKING SPACE</small>; when encoding, they do not write
* byte-order marks. </p></li>
- *
- * <li><p> When decoding, the <tt>UTF-16</tt> charset interprets a byte-order
- * mark to indicate the byte order of the stream but defaults to big-endian
- * if there is no byte-order mark; when encoding, it uses big-endian byte
- * order and writes a big-endian byte-order mark. </p></li>
+
+ *
+ * <li><p> When decoding, the <tt>UTF-16</tt> charset interprets the
+ * byte-order mark at the beginning of the input stream to indicate the
+ * byte-order of the stream but defaults to big-endian if there is no
+ * byte-order mark; when encoding, it uses big-endian byte order and writes
+ * a big-endian byte-order mark. </p></li>
*
* </ul>
*
- * In any case, when a byte-order mark is read at the beginning of a decoding
- * operation it is omitted from the resulting sequence of characters. Byte
- * order marks occuring after the first element of an input sequence are not
- * omitted since the same code is used to represent <small>ZERO-WIDTH
- * NON-BREAKING SPACE</small>.
+ * In any case, byte order marks occuring after the first element of an
+ * input sequence are not omitted since the same code is used to represent
+ * <small>ZERO-WIDTH NON-BREAKING SPACE</small>.
*
* <p> Every instance of the Java virtual machine has a default charset, which
* may or may not be one of the standard charsets. The default charset is
--- a/src/share/classes/sun/nio/ch/Util.java Tue Jul 08 09:27:08 2008 -0700
+++ b/src/share/classes/sun/nio/ch/Util.java Wed Jul 09 10:04:09 2008 -0700
@@ -142,11 +142,10 @@ class Util {
|| ((sel = selWrapper.get()) == null)
|| (sel.provider() != sc.provider())) {
sel = sc.provider().openSelector();
- localSelector.set(new SoftReference<SelectorWrapper>(
- new SelectorWrapper(sel)));
- } else {
- localSelectorWrapper.set(selWrapper);
- }
+ selWrapper = new SelectorWrapper(sel);
+ localSelector.set(new SoftReference<SelectorWrapper>(selWrapper));
+ }
+ localSelectorWrapper.set(selWrapper);
return sel;
}
--- a/src/share/classes/sun/security/provider/certpath/ConstraintsChecker.java Tue Jul 08 09:27:08 2008 -0700
+++ b/src/share/classes/sun/security/provider/certpath/ConstraintsChecker.java Wed Jul 09 10:04:09 2008 -0700
@@ -59,7 +59,7 @@ class ConstraintsChecker extends PKIXCer
private int i;
private NameConstraintsExtension prevNC;
- private static Set<String> supportedExts;
+ private Set<String> supportedExts;
/**
* Creates a ConstraintsChecker.
--- a/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java Tue Jul 08 09:27:08 2008 -0700
+++ b/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java Wed Jul 09 10:04:09 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -198,6 +198,11 @@ class ForwardBuilder extends Builder {
X509CertSelector sel = null;
if (currentState.isInitial()) {
+ if (targetCertConstraints.getBasicConstraints() == -2) {
+ // no need to continue: this means we never can match a CA cert
+ return;
+ }
+
/* This means a CA is the target, so match on same stuff as
* getMatchingEECerts
*/
--- a/src/share/classes/sun/security/provider/certpath/KeyChecker.java Tue Jul 08 09:27:08 2008 -0700
+++ b/src/share/classes/sun/security/provider/certpath/KeyChecker.java Wed Jul 09 10:04:09 2008 -0700
@@ -50,7 +50,7 @@ class KeyChecker extends PKIXCertPathChe
private CertSelector targetConstraints;
private int remainingCerts;
- private static Set<String> supportedExts;
+ private Set<String> supportedExts;
/**
* Default Constructor
--- a/src/share/classes/sun/security/provider/certpath/PolicyChecker.java Tue Jul 08 09:27:08 2008 -0700
+++ b/src/share/classes/sun/security/provider/certpath/PolicyChecker.java Wed Jul 09 10:04:09 2008 -0700
@@ -68,7 +68,7 @@ class PolicyChecker extends PKIXCertPath
private int inhibitAnyPolicy;
private int certIndex;
- private static Set<String> supportedExts;
+ private Set<String> supportedExts;
private static final Debug debug = Debug.getInstance("certpath");
static final String ANY_POLICY = "2.5.29.32.0";
--- a/src/windows/native/java/io/io_util_md.c Tue Jul 08 09:27:08 2008 -0700
+++ b/src/windows/native/java/io/io_util_md.c Wed Jul 09 10:04:09 2008 -0700
@@ -104,23 +104,56 @@ currentDirLength(const WCHAR* ps, int pa
}
}
+/*
+ The "abpathlen" is the size of the buffer needed by _wfullpath. If the
+ "path" is a relative path, it is "the length of the current dir" + "the
+ length of the path", if it's "absolute" already, it's the same as
+ pathlen which is the length of "path".
+ */
+WCHAR* prefixAbpath(const WCHAR* path, int pathlen, int abpathlen) {
+ WCHAR* pathbuf = NULL;
+ WCHAR* abpath = NULL;
+
+ abpathlen += 10; //padding
+ abpath = (WCHAR*)malloc(abpathlen * sizeof(WCHAR));
+ if (abpath) {
+ /* Collapse instances of "foo\.." and ensure absoluteness before
+ going down to prefixing.
+ */
+ if (_wfullpath(abpath, path, abpathlen)) {
+ pathbuf = getPrefixed(abpath, abpathlen);
+ } else {
+ /* _wfullpath fails if the pathlength exceeds 32k wchar.
+ Instead of doing more fancy things we simply copy the
+ ps into the return buffer, the subsequent win32 API will
+ probably fail with FileNotFoundException, which is expected
+ */
+ pathbuf = (WCHAR*)malloc((pathlen + 6) * sizeof(WCHAR));
+ if (pathbuf != 0) {
+ wcscpy(pathbuf, path);
+ }
+ }
+ free(abpath);
+ }
+ return pathbuf;
+}
+
/* If this returns NULL then an exception is pending */
WCHAR*
pathToNTPath(JNIEnv *env, jstring path, jboolean throwFNFE) {
int pathlen = 0;
WCHAR *pathbuf = NULL;
- int max_path = 248; /* Since CreateDirectoryW() has the limit of
- 248 instead of the normal MAX_PATH, we
- use 248 as the max_path to satisfy both
- */
+ int max_path = 248; /* CreateDirectoryW() has the limit of 248 */
+
WITH_UNICODE_STRING(env, path, ps) {
pathlen = wcslen(ps);
if (pathlen != 0) {
if (pathlen > 2 &&
(ps[0] == L'\\' && ps[1] == L'\\' || //UNC
- ps[1] == L':' && ps[2] == L'\\')) { //absolute
+ ps[1] == L':' && ps[2] == L'\\')) //absolute
+ {
if (pathlen > max_path - 1) {
- pathbuf = getPrefixed(ps, pathlen);
+ pathbuf = prefixAbpath(ps, pathlen, pathlen);
} else {
pathbuf = (WCHAR*)malloc((pathlen + 6) * sizeof(WCHAR));
if (pathbuf != 0) {
@@ -132,7 +165,7 @@ pathToNTPath(JNIEnv *env, jstring path,
its absolute form is bigger than max_path or not, if yes
need to (1)convert it to absolute and (2)prefix. This is
obviously a burden to all relative paths (The current dir/len
- for "dirve & directory" relative path is cached, so we only
+ for "drive & directory" relative path is cached, so we only
calculate it once but for "drive-relative path we call
_wgetdcwd() and wcslen() everytime), but a hit we have
to take if we want to support relative path beyond max_path.
@@ -143,24 +176,7 @@ pathToNTPath(JNIEnv *env, jstring path,
WCHAR *abpath = NULL;
int dirlen = currentDirLength(ps, pathlen);
if (dirlen + pathlen + 1 > max_path - 1) {
- int abpathlen = dirlen + pathlen + 10;
- abpath = (WCHAR*)malloc(abpathlen * sizeof(WCHAR));
- if (abpath) {
- if (_wfullpath(abpath, ps, abpathlen)) {
- pathbuf = getPrefixed(abpath, abpathlen);
- } else {
- /* _wfullpath fails if the pathlength exceeds 32k wchar.
- Instead of doing more fancy things we simply copy the
- ps into the return buffer, the subsequent win32 API will
- probably fail with FileNotFoundException, which is expected
- */
- pathbuf = (WCHAR*)malloc((pathlen + 6) * sizeof(WCHAR));
- if (pathbuf != 0) {
- wcscpy(pathbuf, ps);
- }
- }
- free(abpath);
- }
+ pathbuf = prefixAbpath(ps, pathlen, dirlen + pathlen);
} else {
pathbuf = (WCHAR*)malloc((pathlen + 6) * sizeof(WCHAR));
if (pathbuf != 0) {
--- a/test/java/nio/channels/FileChannel/LongTransferTest.java Tue Jul 08 09:27:08 2008 -0700
+++ b/test/java/nio/channels/FileChannel/LongTransferTest.java Wed Jul 09 10:04:09 2008 -0700
@@ -22,7 +22,7 @@
*/
/* @test
- @bug 5105464 6269047
+ @bug 5105464 6269047 6541631
* @summary Test to transfer bytes with a size bigger than Integer.MAX_VALUE
*/
@@ -81,8 +81,10 @@ public class LongTransferTest {
System.out.println("LongTransferTest-main: OK!");
socket.close();
+ server.close();
- server.close();
+ inChannel.close();
+ outChannel.close();
inFile.delete();
outFile.delete();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/io/File/MaxPath.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 6481955
+ @summary Path length less than MAX_PATH (260) works on Windows
+ */
+
+import java.io.*;
+
+public class MaxPath {
+ public static void main(String[] args) throws Exception {
+ String osName = System.getProperty("os.name");
+ if (!osName.startsWith("Windows")) {
+ return;
+ }
+ int MAX_PATH = 260;
+ String dir = new File(".").getAbsolutePath() + "\\";
+ String padding = "1234567890123456789012345678901234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890";
+ for (int i = 240 - dir.length(); i < MAX_PATH - dir.length(); i++) {
+ String longname = dir + padding.substring(0, i);
+ try {
+ File f = new File(longname);
+ if (f.createNewFile()) {
+ if (!f.exists() || !f.canRead()) {
+ throw new RuntimeException("Failed at length: " + longname.length());
+ }
+ f.delete();
+ }
+ } catch (IOException e) {
+ System.out.println("Failed at length: " + longname.length());
+ throw e;
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6714842
+ * @library ../../../testlibrary
+ * @build CertUtils
+ * @run main BuildEEBasicConstraints
+ * @summary make sure a PKIX CertPathBuilder builds a path to an
+ * end entity certificate when the setBasicConstraints method of the
+ * X509CertSelector of the targetConstraints PKIXBuilderParameters
+ * parameter is set to -2.
+ */
+
+import java.security.cert.Certificate;
+import java.security.cert.CertPath;
+import java.security.cert.CertStore;
+import java.security.cert.CollectionCertStoreParameters;
+import java.security.cert.PKIXBuilderParameters;
+import java.security.cert.PKIXCertPathBuilderResult;
+import java.security.cert.TrustAnchor;
+import java.security.cert.X509Certificate;
+import java.security.cert.X509CertSelector;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public final class BuildEEBasicConstraints {
+
+ public static void main(String[] args) throws Exception {
+
+ X509Certificate rootCert = CertUtils.getCertFromFile("anchor.cer");
+ TrustAnchor anchor = new TrustAnchor
+ (rootCert.getSubjectX500Principal(), rootCert.getPublicKey(), null);
+ X509CertSelector sel = new X509CertSelector();
+ sel.setBasicConstraints(-2);
+ PKIXBuilderParameters params = new PKIXBuilderParameters
+ (Collections.singleton(anchor), sel);
+ params.setRevocationEnabled(false);
+ X509Certificate eeCert = CertUtils.getCertFromFile("ee.cer");
+ X509Certificate caCert = CertUtils.getCertFromFile("ca.cer");
+ ArrayList<X509Certificate> certs = new ArrayList<X509Certificate>();
+ certs.add(caCert);
+ certs.add(eeCert);
+ CollectionCertStoreParameters ccsp =
+ new CollectionCertStoreParameters(certs);
+ CertStore cs = CertStore.getInstance("Collection", ccsp);
+ params.addCertStore(cs);
+ PKIXCertPathBuilderResult res = CertUtils.build(params);
+ CertPath cp = res.getCertPath();
+ // check that first certificate is an EE cert
+ List<? extends Certificate> certList = cp.getCertificates();
+ X509Certificate cert = (X509Certificate) certList.get(0);
+ if (cert.getBasicConstraints() != -1) {
+ throw new Exception("Target certificate is not an EE certificate");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/security/cert/CertPathBuilder/targetConstraints/anchor.cer Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,8 @@
+-----BEGIN CERTIFICATE-----
+MIIBFzCBwgIBATANBgkqhkiG9w0BAQQFADAXMRUwEwYDVQQDEwxUcnVzdCBBbmNo
+b3IwHhcNMDIxMTA3MTE1NzAzWhcNMjIxMTA3MTE1NzAzWjAXMRUwEwYDVQQDEwxU
+cnVzdCBBbmNob3IwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA9uCj12hwDgC1n9go
+0ozQAVMM+DfX0vpKOemyGNp+ycSLfAq3pxBcUKbQhjSRL7YjPkEL8XC6pRLwyEoF
+osWweQIDAQABMA0GCSqGSIb3DQEBBAUAA0EAzZta5M1qbbozj7jWnNyTgB4HUpzv
+4eP0VYQb1pQY1/xEMczaRt+RuoIDnHCq5a1vOiwk6ZbdG6GlJKx9lj0oMQ==
+-----END CERTIFICATE-----
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/security/cert/CertPathBuilder/targetConstraints/ca.cer Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,9 @@
+-----BEGIN CERTIFICATE-----
+MIIBSjCB9aADAgECAgECMA0GCSqGSIb3DQEBBAUAMBcxFTATBgNVBAMTDFRydXN0
+IEFuY2hvcjAeFw0wMjExMDcxMTU3MDNaFw0yMjExMDcxMTU3MDNaMA0xCzAJBgNV
+BAMTAkNBMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ8mP3x37PablDfwldGL5G0+
+l9NgMJSdxVNWBg+ySzQNsZklEFCxGfxPQW+EFYfafHbTbmnni2gsgU1mgPBTQDsC
+AwEAAaM2MDQwCwYDVR0PBAQDAgIEMBcGA1UdIAQQMA4wBgYEVR0gADAEBgIqADAM
+BgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA0EA9oCyzh0UKmNsKb+KpppbKYs8
+iA8sDm9oDCwyVSXBM46zrP38nRcx3EdKFvGTwbb/Np+lcZALUsKVYQy3rlU+cQ==
+-----END CERTIFICATE-----
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/security/cert/CertPathBuilder/targetConstraints/ee.cer Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,9 @@
+-----BEGIN CERTIFICATE-----
+MIIBLTCB2KADAgECAgEDMA0GCSqGSIb3DQEBBAUAMA0xCzAJBgNVBAMTAkNBMB4X
+DTAyMTEwNzExNTcwM1oXDTIyMTEwNzExNTcwM1owFTETMBEGA1UEAxMKRW5kIEVu
+dGl0eTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDVBDfF+uBr5s5jzzDs1njKlZNt
+h8hHzEt3ASh67Peos+QrDzgpUyFXT6fdW2h7iPf0ifjM8eW2xa+3EnPjjU5jAgMB
+AAGjGzAZMBcGA1UdIAQQMA4wBgYEVR0gADAEBgIqADANBgkqhkiG9w0BAQQFAANB
+AFo//WOboCNOCcA1fvcWW9oc4MvV8ZPvFIAbyEbgyFd4id5lGDTRbRPvvNZRvdsN
+NM2gXYr+f87NHIXc9EF3pzw=
+-----END CERTIFICATE-----
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/BufferUnderflowEUCTWTest.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4834154
+ @summary Decode a file using EUC-TW, test for decode errors
+ */
+
+/*
+ * Tests for decode errors in NIO EUC-TW decoder. 4734607 details
+ * decoding errors which occur when the input file > 8k in size
+ * and contains numerous US-ASCII range chars
+ */
+
+import java.io.*;
+
+public class BufferUnderflowEUCTWTest {
+ private static int BUFFERSIZE = 8194;
+
+ public static void main (String[] args) throws Exception {
+ int i = 0;
+ byte[] b = new byte[BUFFERSIZE];
+
+ for (; i < BUFFERSIZE - 4; i++) // pad with zeroes
+ b[i] = 0;
+
+ // Overspill a valid EUC-TW 4 byte sequence between 2
+ // successive input buffers.
+ b[i++] = (byte)0x8E;
+ b[i++] = (byte)0xA2;
+ b[i++] = (byte)0xA1;
+ b[i++] = (byte)0xA6;
+
+ ByteArrayInputStream r = new ByteArrayInputStream(b);
+
+ try {
+ InputStreamReader isr=new InputStreamReader(r, "EUC-TW");
+ char[] cc = new char[BUFFERSIZE];
+ int cx = isr.read(cc);
+ } catch (ArrayIndexOutOfBoundsException e) {
+ throw new Exception("Array Index error: bug 4834154");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/CheckCaseInsensitiveEncAliases.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 4216191 4721369 4807283
+ @summary Test to validate case insensitivity of encoding alias names
+ */
+
+// Fixed since 1.4.0 by virtue of NIO charset lookup mechanism
+// which is by design case insensitive
+
+import java.lang.*;
+import java.io.*;
+
+public class CheckCaseInsensitiveEncAliases
+{
+ public static void main(String args[]) throws Exception
+ {
+ // Try various encoding names in mixed cases
+ // Tests subset of encoding names provided within bugID 4216191
+
+ // Various forms of US-ASCII
+ tryToEncode( "ANSI_X3.4-1968" );
+ tryToEncode( "iso-ir-6" );
+ tryToEncode( "ANSI_X3.4-1986" );
+ tryToEncode( "ISO_646.irv:1991" );
+ tryToEncode( "ASCII" );
+ tryToEncode( "ascii" );
+ tryToEncode( "Ascii" );
+ tryToEncode( "Ascii7" );
+ tryToEncode( "ascii7" );
+ tryToEncode( "ISO646-US" );
+ tryToEncode( "US-ASCII" );
+ tryToEncode( "us-ascii" );
+ tryToEncode( "US-Ascii" );
+ tryToEncode( "us" );
+ tryToEncode( "IBM367" );
+ tryToEncode( "cp367" );
+ tryToEncode( "csASCII" );
+
+ // Variants on Unicode
+ tryToEncode( "Unicode" );
+ tryToEncode( "UNICODE" );
+ tryToEncode( "unicode" );
+
+ // Variants on Big5
+ tryToEncode( "Big5" );
+ tryToEncode( "big5" );
+ tryToEncode( "bIg5" );
+ tryToEncode( "biG5" );
+ tryToEncode( "bIG5" );
+
+ // Variants of Cp1252
+ tryToEncode( "Cp1252" );
+ tryToEncode( "cp1252" );
+ tryToEncode( "CP1252" );
+
+ // Variants of PCK
+ tryToEncode( "pck" );
+ tryToEncode( "Pck" );
+
+ }
+
+
+ public static final String ENCODE_STRING = "Encode me";
+
+ public static void tryToEncode( String encoding) throws Exception
+ {
+ try
+ {
+ byte[] bytes = ENCODE_STRING.getBytes( encoding );
+ System.out.println( "Encoding \"" + encoding + "\" recognized" );
+ }
+ catch( UnsupportedEncodingException e )
+ {
+ throw new Exception("Encoding \"" + encoding + "\" NOT recognized");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/CheckHistoricalNames.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,313 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4513767 4961027
+ @summary Checks canonical names match between old and (NIO) core charsets
+ */
+import java.io.InputStreamReader;
+import java.io.IOException;
+
+public class CheckHistoricalNames {
+ static int failed = 0;
+ public static void main (String[] args) throws Exception {
+ checkHistoricalName("ASCII");
+ checkHistoricalName("Cp1252");
+ checkHistoricalName("ISO8859_1");
+ checkHistoricalName("UnicodeBigUnmarked");
+ checkHistoricalName("UnicodeLittle");
+ checkHistoricalName("UnicodeLittleUnmarked");
+ checkHistoricalName("UTF8");
+ checkHistoricalName("UTF-16");
+
+ checkMappedName("UnicodeBig", "UTF-16");
+ checkMappedName("US-ASCII", "ASCII");
+ checkMappedName("ISO-8859-1", "ISO8859_1");
+ checkMappedName("UTF-8", "UTF8");
+ checkMappedName("UTF-16BE", "UnicodeBigUnmarked");
+ checkMappedName("UTF-16LE", "UnicodeLittleUnmarked");
+
+ checkHistoricalName("ISO8859_2");
+ checkHistoricalName("ISO8859_4");
+ checkHistoricalName("ISO8859_5");
+ checkHistoricalName("ISO8859_7");
+ checkHistoricalName("ISO8859_9");
+ checkHistoricalName("ISO8859_13");
+ checkHistoricalName("KOI8_R");
+ checkHistoricalName("Cp1250");
+ checkHistoricalName("Cp1251");
+ checkHistoricalName("Cp1253");
+ checkHistoricalName("Cp1254");
+ checkHistoricalName("Cp1257");
+
+ checkMappedName("ISO-8859-2", "ISO8859_2");
+ checkMappedName("ISO-8859-4", "ISO8859_4");
+ checkMappedName("ISO-8859-5", "ISO8859_5");
+ checkMappedName("ISO-8859-7", "ISO8859_7");
+ checkMappedName("ISO-8859-9", "ISO8859_9");
+ checkMappedName("ISO-8859-13", "ISO8859_13");
+ checkMappedName("KOI8-R", "KOI8_R");
+ checkMappedName("windows-1250", "Cp1250");
+ checkMappedName("windows-1251","Cp1251");
+ checkMappedName("windows-1253", "Cp1253");
+ checkMappedName("windows-1254", "Cp1254");
+ checkMappedName("windows-1257", "Cp1257");
+
+ checkHistoricalName("EUC_CN");
+ checkHistoricalName("EUC_JP");
+ checkHistoricalName("EUC_JP_LINUX");
+ checkHistoricalName("EUC_KR");
+ checkHistoricalName("EUC_TW");
+ checkHistoricalName("ISO2022CN");
+ checkHistoricalName("ISO2022JP");
+ checkHistoricalName("ISO2022KR");
+ checkHistoricalName("ISO8859_3");
+ checkHistoricalName("ISO8859_6");
+ checkHistoricalName("ISO8859_8");
+ checkHistoricalName("Cp1255");
+ checkHistoricalName("Cp1256");
+ checkHistoricalName("Cp1258");
+ checkHistoricalName("MS936");
+ checkHistoricalName("MS949");
+ checkHistoricalName("MS950");
+ checkHistoricalName("TIS620");
+
+ checkMappedName("EUC-CN", "EUC_CN");
+ checkMappedName("EUC-JP", "EUC_JP");
+ checkMappedName("EUC-JP-LINUX", "EUC_JP_LINUX");
+ checkMappedName("EUC-TW", "EUC_TW");
+ checkMappedName("EUC-KR", "EUC_KR");
+ checkMappedName("ISO-2022-CN", "ISO2022CN");
+ checkMappedName("ISO-2022-JP", "ISO2022JP");
+ checkMappedName("ISO-2022-KR", "ISO2022KR");
+ checkMappedName("ISO-8859-3", "ISO8859_3");
+ checkMappedName("ISO-8859-6", "ISO8859_6");
+ checkMappedName("ISO-8859-8", "ISO8859_8");
+ checkMappedName("windows-1255", "Cp1255");
+ checkMappedName("windows-1256", "Cp1256");
+ checkMappedName("windows-1258", "Cp1258");
+ checkMappedName("windows-936", "GBK");
+ checkMappedName("windows-949", "MS949");
+ checkMappedName("windows-950", "MS950");
+ checkMappedName("x-MS950-HKSCS", "MS950_HKSCS");
+ checkMappedName("x-PCK", "PCK");
+ checkMappedName("Shift_JIS", "SJIS");
+ checkMappedName("x-JISAutoDetect", "JISAutoDetect");
+ checkMappedName("TIS-620", "TIS620");
+ checkMappedName("x-Big5-Solaris", "Big5_Solaris");
+
+ checkHistoricalName("Cp037");
+ checkHistoricalName("Cp1006");
+ checkHistoricalName("Cp1025");
+ checkHistoricalName("Cp1026");
+ checkHistoricalName("Cp1046");
+ checkHistoricalName("Cp1047");
+ checkHistoricalName("Cp1097");
+ checkHistoricalName("Cp1098");
+ checkHistoricalName("Cp1112");
+ checkHistoricalName("Cp1122");
+ checkHistoricalName("Cp1123");
+ checkHistoricalName("Cp1124");
+ checkHistoricalName("Cp1140");
+ checkHistoricalName("Cp1141");
+ checkHistoricalName("Cp1142");
+ checkHistoricalName("Cp1143");
+ checkHistoricalName("Cp1144");
+ checkHistoricalName("Cp1145");
+ checkHistoricalName("Cp1146");
+ checkHistoricalName("Cp1147");
+ checkHistoricalName("Cp1148");
+ checkHistoricalName("Cp1149");
+ checkHistoricalName("Cp1381");
+ checkHistoricalName("Cp1383");
+ checkHistoricalName("Cp273");
+ checkHistoricalName("Cp277");
+ checkHistoricalName("Cp278");
+ checkHistoricalName("Cp280");
+ checkHistoricalName("Cp284");
+ checkHistoricalName("Cp285");
+ checkHistoricalName("Cp297");
+ checkHistoricalName("Cp33722");
+ checkHistoricalName("Cp420");
+ checkHistoricalName("Cp424");
+ checkHistoricalName("Cp437");
+ checkHistoricalName("Cp500");
+ checkHistoricalName("Cp737");
+ checkHistoricalName("Cp775");
+ checkHistoricalName("Cp838");
+ checkHistoricalName("Cp850");
+ checkHistoricalName("Cp852");
+ checkHistoricalName("Cp855");
+ checkHistoricalName("Cp856");
+ checkHistoricalName("Cp857");
+ checkHistoricalName("Cp858");
+ checkHistoricalName("Cp860");
+ checkHistoricalName("Cp861");
+ checkHistoricalName("Cp862");
+ checkHistoricalName("Cp863");
+ checkHistoricalName("Cp864");
+ checkHistoricalName("Cp865");
+ checkHistoricalName("Cp866");
+ checkHistoricalName("Cp868");
+ checkHistoricalName("Cp869");
+ checkHistoricalName("Cp870");
+ checkHistoricalName("Cp871");
+ checkHistoricalName("Cp874");
+ checkHistoricalName("Cp875");
+ checkHistoricalName("Cp918");
+ checkHistoricalName("Cp921");
+ checkHistoricalName("Cp922");
+ checkHistoricalName("Cp933");
+ checkHistoricalName("Cp939");
+ checkHistoricalName("Cp949");
+ checkHistoricalName("Cp964");
+ checkHistoricalName("Cp970");
+
+ checkMappedName("IBM037", "Cp037");
+ checkMappedName("IBM1006", "Cp1006");
+ checkMappedName("IBM1025", "Cp1025");
+ checkMappedName("IBM1026", "Cp1026");
+ checkMappedName("x-IBM1046", "Cp1046");
+ checkMappedName("IBM1047", "Cp1047");
+ checkMappedName("IBM1097", "Cp1097");
+ checkMappedName("IBM1098", "Cp1098");
+ checkMappedName("IBM1112", "Cp1112");
+ checkMappedName("IBM1122", "Cp1122");
+ checkMappedName("IBM1123", "Cp1123");
+ checkMappedName("IBM1124", "Cp1124");
+ checkMappedName("IBM01140", "Cp1140");
+ checkMappedName("IBM01141", "Cp1141");
+ checkMappedName("IBM01142", "Cp1142");
+ checkMappedName("IBM01143", "Cp1143");
+ checkMappedName("IBM01144", "Cp1144");
+ checkMappedName("IBM01145", "Cp1145");
+ checkMappedName("IBM01146", "Cp1146");
+ checkMappedName("IBM01147", "Cp1147");
+ checkMappedName("IBM01148", "Cp1148");
+ checkMappedName("IBM01149", "Cp1149");
+ checkMappedName("IBM1381", "Cp1381");
+ checkMappedName("IBM1383", "Cp1383");
+ checkMappedName("IBM273", "Cp273");
+ checkMappedName("IBM277", "Cp277");
+ checkMappedName("IBM278", "Cp278");
+ checkMappedName("IBM280", "Cp280");
+ checkMappedName("IBM284", "Cp284");
+ checkMappedName("IBM285", "Cp285");
+ checkMappedName("IBM297", "Cp297");
+ checkMappedName("IBM33722", "Cp33722");
+ checkMappedName("IBM420", "Cp420");
+ checkMappedName("IBM424", "Cp424");
+ checkMappedName("IBM437", "Cp437");
+ checkMappedName("IBM500", "Cp500");
+ checkMappedName("IBM737", "Cp737");
+ checkMappedName("IBM775", "Cp775");
+ checkMappedName("IBM838", "Cp838");
+ checkMappedName("IBM850", "Cp850");
+ checkMappedName("IBM852", "Cp852");
+ checkMappedName("IBM855", "Cp855");
+ checkMappedName("IBM856", "Cp856");
+ checkMappedName("IBM857", "Cp857");
+ checkMappedName("IBM00858", "Cp858");
+ checkMappedName("IBM860", "Cp860");
+ checkMappedName("IBM861", "Cp861");
+ checkMappedName("IBM862", "Cp862");
+ checkMappedName("IBM863", "Cp863");
+ checkMappedName("IBM864", "Cp864");
+ checkMappedName("IBM865", "Cp865");
+ checkMappedName("IBM866", "Cp866");
+ checkMappedName("IBM868", "Cp868");
+ checkMappedName("IBM869", "Cp869");
+ checkMappedName("IBM870", "Cp870");
+ checkMappedName("IBM871", "Cp871");
+ checkMappedName("IBM874", "Cp874");
+ checkMappedName("IBM875", "Cp875");
+ checkMappedName("IBM918", "Cp918");
+ checkMappedName("IBM921", "Cp921");
+ checkMappedName("IBM922", "Cp922");
+ checkMappedName("x-IBM930", "Cp930");
+ checkMappedName("IBM933", "Cp933");
+ checkMappedName("x-IBM935", "Cp935");
+ checkMappedName("x-IBM937", "Cp937");
+ checkMappedName("IBM939", "Cp939");
+ checkMappedName("x-IBM942", "Cp942");
+ checkMappedName("x-IBM942C", "Cp942C");
+ checkMappedName("x-IBM943", "Cp943");
+ checkMappedName("x-IBM943C", "Cp943C");
+ checkMappedName("x-IBM948", "Cp948");
+ checkMappedName("IBM949", "Cp949");
+ checkMappedName("x-IBM949C", "Cp949C");
+ checkMappedName("x-IBM950", "Cp950");
+ checkMappedName("IBM964", "Cp964");
+ checkMappedName("IBM970", "Cp970");
+
+ checkHistoricalName("MacArabic");
+ checkHistoricalName("MacCentralEurope");
+ checkHistoricalName("MacCroatian");
+ checkHistoricalName("MacCyrillic");
+ checkHistoricalName("MacDingbat");
+ checkHistoricalName("MacGreek");
+ checkHistoricalName("MacHebrew");
+ checkHistoricalName("MacIceland");
+ checkHistoricalName("MacRoman");
+ checkHistoricalName("MacRomania");
+ checkHistoricalName("MacSymbol");
+ checkHistoricalName("MacThai");
+ checkHistoricalName("MacTurkish");
+ checkHistoricalName("MacUkraine");
+
+ checkMappedName("x-MacArabic", "MacArabic");
+ checkMappedName("x-MacCentralEurope", "MacCentralEurope");
+ checkMappedName("x-MacCroatian", "MacCroatian");
+ checkMappedName("x-MacCyrillic", "MacCyrillic");
+ checkMappedName("x-MacDingbat", "MacDingbat");
+ checkMappedName("x-MacGreek", "MacGreek");
+ checkMappedName("x-MacHebrew", "MacHebrew");
+ checkMappedName("x-MacIceland", "MacIceland");
+ checkMappedName("x-MacRoman", "MacRoman");
+ checkMappedName("x-MacRomania", "MacRomania");
+ checkMappedName("x-MacSymbol", "MacSymbol");
+ checkMappedName("x-MacThai", "MacThai");
+ checkMappedName("x-MacTurkish", "MacTurkish");
+ checkMappedName("x-MacUkraine", "MacUkraine");
+
+ if (failed != 0)
+ throw new Exception("Test Failed: " + failed);
+ else
+ System.out.println("Test Passed!");
+ }
+
+ private static void checkHistoricalName(String name) throws Exception {
+ checkMappedName(name, name);
+ }
+
+ private static void checkMappedName(String alias, String canonical)
+ throws Exception {
+ InputStreamReader reader = new InputStreamReader(System.in, alias);
+ if (!reader.getEncoding().equals(canonical)) {
+ System.out.println("Failed canonical names : mismatch for " + alias
+ + " - expected " + canonical
+ + ", got " + reader.getEncoding());
+ failed++;
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/ConvertSingle.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4094987
+ @summary Verify that malformed expression exceptions are thrown
+ but no internal errors in certain pathologial cases.
+
+ */
+
+
+import java.io.*;
+import java.nio.charset.*;
+
+public class ConvertSingle {
+
+ public static void main(String args[]) throws Exception {
+ // This conversion is pathologically bad - it is attempting to
+ // read unicode from an ascii encoded string.
+ // The orignal bug: A internal error in ISR results if the
+ // byte counter in ByteToCharUnicode
+ // is not advanced as the input is consumed.
+
+ try{
+ String s = "\n";
+ byte ss[] = null;
+ String sstring = "x";
+ ss = s.getBytes();
+ ByteArrayInputStream BAIS = new ByteArrayInputStream(ss);
+ InputStreamReader ISR = new InputStreamReader(BAIS, "Unicode");
+ BufferedReader BR = new BufferedReader(ISR);
+ sstring = BR.readLine();
+ BR.close();
+ System.out.println(sstring);
+ } catch (MalformedInputException e){
+ // Right error
+ return;
+ } catch (java.lang.InternalError e) {
+ throw new Exception("ByteToCharUnicode is failing incorrectly for "
+ + " single byte input");
+ }
+
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/Decode.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**/
+
+public class Decode {
+ private static boolean isAscii(char c) {
+ return c < '\u0080';
+ }
+
+ private static boolean isPrintable(char c) {
+ return ('\u0020' < c) && (c < '\u007f');
+ }
+
+ public static void main(String[] args) throws Throwable {
+ if (args.length < 2)
+ throw new Exception("Usage: java Decode CHARSET BYTE [BYTE ...]");
+ String cs = args[0];
+ byte[] bytes = new byte[args.length-1];
+ for (int i = 1; i < args.length; i++) {
+ String arg = args[i];
+ bytes[i-1] =
+ (arg.length() == 1 && isAscii(arg.charAt(0))) ?
+ (byte) arg.charAt(0) :
+ arg.equals("ESC") ? 0x1b :
+ arg.equals("SO") ? 0x0e :
+ arg.equals("SI") ? 0x0f :
+ arg.equals("SS2") ? (byte) 0x8e :
+ arg.equals("SS3") ? (byte) 0x8f :
+ arg.matches("0x.*") ? Integer.decode(arg).byteValue() :
+ Integer.decode("0x"+arg).byteValue();
+ }
+ String s = new String(bytes, cs);
+
+ for (int j = 0; j < s.length(); j++) {
+ if (j > 0)
+ System.out.print(' ');
+ char c = s.charAt(j);
+ if (isPrintable(c))
+ System.out.print(c);
+ else if (c == '\u001b') System.out.print("ESC");
+ else
+ System.out.printf("\\u%04x", (int) c);
+ }
+ System.out.print("\n");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/DecoderOverflow.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 5101128
+ @summary Check behavior of CharsetDecoder.decode when overflow occurs
+ @author Martin Buchholz
+ */
+
+import java.util.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class DecoderOverflow {
+ static int failures = 0;
+
+ public static void main(String[] args) throws Exception {
+ for (String csn : Charset.availableCharsets().keySet()) {
+ try {
+ test(csn);
+ } catch (Throwable t) {
+ System.out.println(csn);
+ t.printStackTrace();
+ failures++;
+ }
+ }
+ if (failures > 0)
+ throw new Exception(failures + " charsets failed");
+ }
+
+ static void test(String encoding) throws Exception {
+ String text = "Vote for Duke!";
+ Charset cs = Charset.forName(encoding);
+ if (! cs.canEncode() || ! cs.newEncoder().canEncode('.')) return;
+ ByteBuffer in = ByteBuffer.wrap(text.getBytes(encoding));
+ CharBuffer out = CharBuffer.allocate(text.length()/2);
+ CoderResult result = cs.newDecoder().decode(in, out, true);
+ if (out.hasRemaining() || ! result.isOverflow())
+ throw new Exception
+ ("out.hasRemaining()=" + out.hasRemaining() +
+ " result.isOverflow()=" + result.isOverflow() +
+ " in.capacity()=" + in.capacity() +
+ " encoding=" + encoding);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/EUCJPUnderflowDecodeTest.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4867457
+ @summary Check for correct byte buffer underflow handling in EUC-JP
+ */
+
+import java.io.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class EUCJPUnderflowDecodeTest {
+ public static void main(String[] args) throws Exception{
+
+ ByteBuffer bb = ByteBuffer.allocateDirect(255);
+ CharBuffer cc = CharBuffer.allocate(255);
+
+
+ // Test both regular EUC-JP and Linux variant
+
+ String[] charsetNames = { "EUC_JP", "EUC-JP-LINUX" };
+
+ for (int i = 0 ; i < charsetNames.length; i++) {
+ Charset cs = Charset.forName(charsetNames[i]);
+ CharsetDecoder decoder = cs.newDecoder();
+ bb.clear();
+ cc.clear();
+
+ // Fakes a partial 3 byte EUC_JP (JIS-X-0212 range)
+ // encoded character/byte sequence
+ bb.put((byte)0x8f);
+ bb.put((byte)0xa2);
+ bb.flip();
+ // Now decode with endOfInput method param set to
+ // indicate to decoder that there is more encoded
+ // data to follow in a subsequent invocation
+
+ CoderResult result = decoder.decode(bb, cc, false);
+
+ // java.nio.charset.CharsetDecoder spec specifies
+ // that the coder ought to return CoderResult.UNDERFLOW
+ // when insufficient bytes have been supplied to complete
+ // the decoding operation
+
+ if (result != CoderResult.UNDERFLOW) {
+ throw new Exception("test failed - UNDERFLOW not returned");
+ }
+
+ // Repeat the test with the lead byte (minus its pursuing
+ // trail byte) for the EUC-JP 2 byte (JIS208) range
+ decoder.reset();
+ bb.clear();
+ cc.clear();
+ bb.put((byte)0xa1);
+ bb.flip();
+ result = decoder.decode(bb, cc, false);
+ if (result != CoderResult.UNDERFLOW) {
+ throw new Exception("test failed");
+ }
+
+ // finally ensure that a valid JIS208 range EUC-JP
+ // 2 byte value is correctly decoded when it is presented
+ // at the trailing bounds of a ByteBuffer in the case where
+ // charset decoder expects (endOfInput ==false) more
+ //input to follow
+
+ decoder.reset();
+ bb.clear();
+ cc.clear();
+ bb.put((byte)0xa1);
+ bb.put((byte)0xc0);
+ bb.flip();
+
+ result = decoder.decode(bb, cc, false);
+
+ cc.flip();
+
+ if (result != CoderResult.UNDERFLOW && cc.get() != '\uFF3c') {
+ throw new Exception("test failed to decode EUC-JP (0xA1C0)");
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/EucJpLinux0212.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6350021
+ * @summary Consistency checks when input buffer contains JISX0212 characters
+ * @author Martin Buchholz
+ */
+
+import java.io.*;
+import java.util.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class EucJpLinux0212 {
+ private static void equal(CharBuffer b1, CharBuffer b2) {
+ equal(b1.position(), b2.position());
+ equal(b1.limit(), b2.limit());
+ System.out.printf("positions=%d %d%n", b1.position(), b2.position());
+ System.out.printf("limits=%d %d%n", b1.limit(), b2.limit());
+ for (int i = b1.position(); i < b1.limit(); i++)
+ equal((int)b1.get(i), (int)b2.get(i));
+ }
+
+ private static void realMain(String[] args) throws Throwable {
+ List<ByteBuffer> bbs = Arrays.asList(
+ ByteBuffer.allocate(10),
+ ByteBuffer.allocateDirect(10));
+ List<CharBuffer> cbs = new ArrayList<CharBuffer>();
+
+ for (ByteBuffer bb : bbs) {
+ bb.put(new byte[]{ (byte)0x8f, 0x01, 0x02,
+ (byte)0xa1, (byte)0xc0,
+ 0x02, 0x03});
+ bb.flip();
+ CharsetDecoder decoder = Charset.forName("EUC_JP_LINUX").newDecoder();
+ decoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
+ CharBuffer cb = decoder.decode(bb);
+ cbs.add(cb);
+ }
+ equal(cbs.get(0), cbs.get(1));
+ }
+
+ //--------------------- Infrastructure ---------------------------
+ static volatile int passed = 0, failed = 0;
+ static void pass() {passed++;}
+ static void fail() {failed++; Thread.dumpStack();}
+ static void fail(String msg) {System.out.println(msg); fail();}
+ static void unexpected(Throwable t) {failed++; t.printStackTrace();}
+ static void check(boolean cond) {if (cond) pass(); else fail();}
+ static void equal(Object x, Object y) {
+ if (x == null ? y == null : x.equals(y)) pass();
+ else fail(x + " not equal to " + y);}
+ public static void main(String[] args) throws Throwable {
+ try {realMain(args);} catch (Throwable t) {unexpected(t);}
+ System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+ if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/EucJpLinuxDecoderRecoveryTest.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 5016049
+ @summary ensure euc-jp-linux charset decoder recovery for unmappable input
+ */
+
+import java.io.*;
+
+public class EucJpLinuxDecoderRecoveryTest {
+ public static void main(String[] args) throws Exception {
+ byte[] encoded = {
+ // EUC_JP_LINUX mappable JIS X 0208 range
+ (byte)0xa6, (byte)0xc5,
+ // EUC_JP_LINUX Unmappable (JIS X 0212 range)
+ (byte)0x8f, (byte)0xa2, (byte)0xb7,
+ // EUC_JP_LINUX mappable JIS X 0208 range
+ (byte)0xa6, (byte)0xc7 };
+
+ char[] decodedChars = new char[3];
+ char[] expectedChars =
+ {
+ '\u03B5', // mapped
+ '\ufffd', // unmapped
+ '\u03B7' // mapped
+ };
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(encoded);
+ InputStreamReader isr = new InputStreamReader(bais, "EUC_JP_LINUX");
+ int n = 0; // number of chars decoded
+
+ try {
+ n = isr.read(decodedChars);
+ } catch (Exception ex) {
+ throw new Error("euc-jp-linux decoding broken");
+ }
+
+ // check number of decoded chars is what is expected
+ if (n != expectedChars.length)
+ throw new Error("Unexpected number of chars decoded");
+
+ // Compare actual decoded with expected
+
+ for (int i = 0; i < n; i++) {
+ if (expectedChars[i] != decodedChars[i])
+ throw new Error("euc-jp-linux decoding incorrect");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/EuroConverter.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 4114080
+ * @summary Make sure the euro converters, which are derived from
+ * existing converters, only differ from their parents at the expected
+ * code point.
+ */
+
+import java.text.*;
+import java.util.*;
+import java.io.*;
+
+/* Author: Alan Liu
+ * 7/14/98
+ */
+public class EuroConverter {
+ public static void main(String args[]) throws Exception {
+ boolean pass = true;
+ char[] map = new char[256]; // map for the encoding
+ byte[] bytes = new byte[1]; // scratch
+ char[] chars = new char[1]; // scratch
+ for (int i=0; i<DATA.length; ) {
+ String euroEnc = DATA[i++];
+ String parentEnc = DATA[i++];
+ System.out.println("Checking encoder " + euroEnc + " against " + parentEnc);
+ String currentEnc = parentEnc;
+
+ try {
+ // Fill map with parent values
+ for (int j=-128; j<128; ++j) {
+ bytes[0] = (byte)j;
+ char parentValue = new String(bytes, parentEnc).charAt(0);
+ // NOTE: 0x25 doesn't round trip on the EBCDIC code pages,
+ // so we don't check that code point in the sanity check.
+ if (j != 0x0025) {
+ chars[0] = parentValue;
+ int parentRoundTrip = new String(chars).getBytes(parentEnc)[0];
+ // This is a sanity check -- we aren't really testing the parent
+ // encoder here.
+ if (parentRoundTrip != j) {
+ pass = false;
+ System.out.println("Error: Encoder " + parentEnc +
+ " fails round-trip: " + j +
+ " -> \\u" + Integer.toHexString(parentValue) +
+ " -> " + parentRoundTrip);
+ }
+ }
+ map[(j+0x100)&0xFF] = parentValue;
+ }
+
+ // Modify map with new expected values. Each pair has code point, parent value, euro value.
+ // Terminated by null.
+ while (DATA[i] != null) {
+ int codePoint = Integer.valueOf(DATA[i++], 16).intValue();
+ char expectedParentValue = DATA[i++].charAt(0);
+ char expectedEuroValue = DATA[i++].charAt(0);
+ // This is a sanity check -- we aren't really testing the parent
+ // encoder here.
+ if (map[codePoint] != expectedParentValue) {
+ pass = false;
+ System.out.println("Error: Encoder " + parentEnc +
+ " " + Integer.toHexString(codePoint) + " -> \\u" +
+ Integer.toHexString(map[codePoint]) + ", expected \\u" +
+ Integer.toHexString(expectedParentValue));
+ }
+ // Fill in new expected value
+ map[codePoint] = expectedEuroValue;
+ }
+ ++i; // Skip over null at end of set
+
+ // Now verify the euro encoder
+ currentEnc = euroEnc;
+ for (int j=-128; j<128; ++j) {
+ bytes[0] = (byte)j;
+ char euroValue = new String(bytes, euroEnc).charAt(0);
+ chars[0] = euroValue;
+ // NOTE: 0x15 doesn't round trip on the EBCDIC code pages,
+ // so we don't check that code point in the sanity check.
+ if (j != 0x0015) {
+ int euroRoundTrip = new String(chars).getBytes(euroEnc)[0];
+ if (euroRoundTrip != j) {
+ pass = false;
+ System.out.println("Error: Encoder " + euroEnc +
+ " fails round-trip at " + j);
+ }
+ }
+ // Compare against the map
+ if (euroValue != map[(j+0x100)&0xFF]) {
+ pass = false;
+ System.out.println("Error: Encoder " + euroEnc +
+ " " + Integer.toHexString((j+0x100)&0xFF) + " -> \\u" +
+ Integer.toHexString(euroValue) + ", expected \\u" +
+ Integer.toHexString(map[(j+0x100)&0xFF]));
+ }
+ }
+ } catch (UnsupportedEncodingException e) {
+ System.out.println("Unsupported encoding " + currentEnc);
+ pass = false;
+ while (i < DATA.length && DATA[i] != null) ++i;
+ ++i; // Skip over null
+ }
+ }
+ if (!pass) {
+ throw new RuntimeException("Bug 4114080 - Euro encoder test failed");
+ }
+ }
+ static String[] DATA = {
+ // New converter, parent converter, [ code point that changed, parent code point value,
+ // euro code point value ], null
+ // Any number of changed code points may be specified, including zero.
+ "ISO8859_15_FDIS", "ISO8859_1",
+ "A4", "\u00A4", "\u20AC",
+ "A6", "\u00A6", "\u0160",
+ "A8", "\u00A8", "\u0161",
+ "B4", "\u00B4", "\u017D",
+ "B8", "\u00B8", "\u017E",
+ "BC", "\u00BC", "\u0152",
+ "BD", "\u00BD", "\u0153",
+ "BE", "\u00BE", "\u0178",
+ null,
+ // 923 is IBM's name for ISO 8859-15; make sure they're identical
+ "Cp923", "ISO8859_15_FDIS", null,
+ "Cp858", "Cp850", "D5", "\u0131", "\u20AC", null,
+ "Cp1140", "Cp037", "9F", "\u00A4", "\u20AC", null,
+ "Cp1141", "Cp273", "9F", "\u00A4", "\u20AC", null,
+ "Cp1142", "Cp277", "5A", "\u00A4", "\u20AC", null,
+ "Cp1143", "Cp278", "5A", "\u00A4", "\u20AC", null,
+ "Cp1144", "Cp280", "9F", "\u00A4", "\u20AC", null,
+ "Cp1145", "Cp284", "9F", "\u00A4", "\u20AC", null,
+ "Cp1146", "Cp285", "9F", "\u00A4", "\u20AC", null,
+ "Cp1147", "Cp297", "9F", "\u00A4", "\u20AC", null,
+ "Cp1148", "Cp500", "9F", "\u00A4", "\u20AC", null,
+ "Cp1149", "Cp871", "9F", "\u00A4", "\u20AC", null,
+ };
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/FindASCIICodingBugs.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6196991
+ * @summary Roundtrip Encoding/Decoding of just one ASCII char
+ * @author Martin Buchholz
+ */
+
+import java.util.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class FindASCIICodingBugs {
+ private static int failures = 0;
+
+ private static void check(boolean condition) {
+ if (! condition) {
+ new Error("test failed").printStackTrace();
+ failures++;
+ }
+ }
+
+ private static boolean equals(byte[] ba, ByteBuffer bb) {
+ if (ba.length != bb.limit())
+ return false;
+ for (int i = 0; i < ba.length; i++)
+ if (ba[i] != bb.get(i))
+ return false;
+ return true;
+ }
+
+ public static void main(String[] args) throws Exception {
+ for (Map.Entry<String,Charset> e
+ : Charset.availableCharsets().entrySet()) {
+ String csn = e.getKey();
+ Charset cs = e.getValue();
+
+ // Delete the following lines when these charsets are fixed!
+ if (csn.equals("x-JIS0208")) continue; // MalformedInput
+ if (csn.equals("JIS_X0212-1990")) continue; // MalformedInput
+
+ if (! cs.canEncode()) continue;
+
+ CharsetEncoder enc = cs.newEncoder();
+ CharsetDecoder dec = cs.newDecoder();
+
+ if (! enc.canEncode('A')) continue;
+
+ System.out.println(csn);
+
+ try {
+ byte[] bytes1 = "A".getBytes(csn);
+ ByteBuffer bb = enc.encode(CharBuffer.wrap(new char[]{'A'}));
+
+ check(equals(bytes1, bb));
+ check(new String(bytes1, csn).equals("A"));
+
+ CharBuffer cb = dec.decode(bb);
+ check(cb.toString().equals("A"));
+ } catch (Throwable t) {
+ t.printStackTrace();
+ failures++;
+ }
+ }
+
+ if (failures > 0)
+ throw new Exception(failures + "tests failed");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/FindASCIIRangeCodingBugs.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6378295
+ * @summary Roundtrip Encoding/Decoding of ASCII chars from 0x00-0x7f
+ */
+
+import java.util.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class FindASCIIRangeCodingBugs {
+ private static int failures = 0;
+ private static byte[] asciiBytes = new byte[0x80];
+ private static char[] asciiChars = new char[0x80];
+ private static String asciiString;
+
+ private static void check(String csn) throws Exception {
+ System.out.println(csn);
+ if (! Arrays.equals(asciiString.getBytes(csn), asciiBytes)) {
+ System.out.printf("%s -> bytes%n", csn);
+ failures++;
+ }
+ if (! new String(asciiBytes, csn).equals(asciiString)) {
+ System.out.printf("%s -> chars%n", csn);
+ failures++;
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ for (int i = 0; i < 0x80; i++) {
+ asciiBytes[i] = (byte) i;
+ asciiChars[i] = (char) i;
+ }
+ asciiString = new String(asciiChars);
+ Charset ascii = Charset.forName("ASCII");
+ for (Map.Entry<String,Charset> e
+ : Charset.availableCharsets().entrySet()) {
+ String csn = e.getKey();
+ Charset cs = e.getValue();
+ if (!cs.contains(ascii) ||
+ csn.matches(".*2022.*") || //iso2022 family
+ csn.matches("x-windows-5022[0|1]") || //windows 2022jp
+ csn.matches(".*UTF-[16|32].*")) //multi-bytes
+ continue;
+ if (! cs.canEncode()) continue;
+ try {
+ check(csn);
+ } catch (Throwable t) {
+ t.printStackTrace();
+ failures++;
+ }
+ }
+ if (failures > 0)
+ throw new Exception(failures + "tests failed");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/FindCanEncodeBugs.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 5066863 5066867 5066874 5066879 5066884 5066887
+ @summary canEncode() false iff encode() throws CharacterCodingException
+ @run main/timeout=1200 FindCanEncodeBugs
+ @author Martin Buchholz
+ */
+
+import java.util.*;
+import java.nio.charset.*;
+import java.nio.*;
+
+public class FindCanEncodeBugs {
+ static boolean encodable1(CharsetEncoder enc, char c) {
+ enc.reset();
+ return enc.canEncode(c);
+ }
+
+ static boolean encodable2(CharsetEncoder enc, char c) {
+ enc.reset();
+ try { enc.encode(CharBuffer.wrap(new char[]{c})); return true; }
+ catch (CharacterCodingException e) { return false; }
+ }
+
+ public static void main(String[] args) throws Exception {
+ int failures = 0;
+
+ for (Map.Entry<String,Charset> e
+ : Charset.availableCharsets().entrySet()) {
+ String csn = e.getKey();
+ Charset cs = e.getValue();
+
+ if (! cs.canEncode() ||
+ csn.matches("x-COMPOUND_TEXT") ||
+ csn.matches("x-ISO-2022-CN-CNS") || // ISO2022_CN_CNS supports less
+ csn.matches("(x-)?IBM(970).*")) // Broken as of 2004-07
+ continue;
+
+ //System.out.println(csn);
+
+ CharsetEncoder enc = cs.newEncoder();
+
+ for (int i = Character.MIN_VALUE; i <= Character.MAX_VALUE; i++) {
+ boolean encodable1 = encodable1(enc, (char)i);
+ boolean encodable2 = encodable2(enc, (char)i);
+ if (encodable1 != encodable2) {
+ int start = i;
+ int end = i;
+ for (int j = i;
+ j <= '\uffff' &&
+ encodable1(enc, (char)j) == encodable1 &&
+ encodable2(enc, (char)j) == encodable2;
+ j++)
+ end = j;
+ System.out.printf("charset=%-18s canEncode=%-5b ",
+ csn, encodable1);
+ if (start == end)
+ System.out.printf("\'\\u%04x\'%n", start);
+ else
+ System.out.printf("\'\\u%04x\' - \'\\u%04x\'%n",
+ start, end);
+ i = end;
+ failures++;
+ }
+ }
+ }
+
+ if (failures > 0)
+ throw new Exception(failures + " failures");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/FindDecoderBugs.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,442 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6380723
+ * @summary Decode many byte sequences in many ways
+ * @run main/timeout=1800 FindDecoderBugs
+ * @author Martin Buchholz
+ */
+
+import java.util.*;
+import java.util.regex.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class FindDecoderBugs {
+
+ static boolean isBroken(String csn) {
+ if (csn.equals("x-COMPOUND_TEXT")) return true;
+ return false;
+ }
+
+ static <T extends Comparable<? super T>> List<T> sort(Collection<T> c) {
+ List<T> list = new ArrayList<T>(c);
+ Collections.sort(list);
+ return list;
+ }
+
+ static class TooManyFailures extends RuntimeException {
+ private static final long serialVersionUID = 0L;
+ }
+
+ static String string(byte[] a) {
+ final StringBuilder sb = new StringBuilder();
+ for (byte b : a) {
+ if (sb.length() != 0) sb.append(' ');
+ sb.append(String.format("%02x", b & 0xff));
+ }
+ return sb.toString();
+ }
+
+ static String string(char[] a) {
+ final StringBuilder sb = new StringBuilder();
+ for (char c : a) {
+ if (sb.length() != 0) sb.append(' ');
+ sb.append(String.format("\\u%04x", (int) c));
+ }
+ return sb.toString();
+ }
+
+ static class Reporter {
+ // Some machinery to make sure only a small number of errors
+ // that are "too similar" are reported.
+ static class Counts extends HashMap<String, Long> {
+ private static final long serialVersionUID = -1;
+ long inc(String signature) {
+ Long count = get(signature);
+ if (count == null) count = 0L;
+ put(signature, count+1);
+ return count+1;
+ }
+ }
+
+ final Counts failureCounts = new Counts();
+ final static long maxFailures = 2;
+
+ final static Pattern hideBytes = Pattern.compile("\"[0-9a-f ]+\"");
+ final static Pattern hideChars = Pattern.compile("\\\\u[0-9a-f]{4}");
+
+ boolean bug(String format, Object... args) {
+ String signature = String.format(format, args);
+ signature = hideBytes.matcher(signature).replaceAll("\"??\"");
+ signature = hideChars.matcher(signature).replaceAll("\\u????");
+ failed++;
+ if (failureCounts.inc(signature) <= maxFailures) {
+ System.out.printf(format, args);
+ System.out.println();
+ return true;
+ }
+ return false;
+ }
+
+ void summarize() {
+ for (String key : sort(failureCounts.keySet()))
+ System.out.printf("-----%n%s%nfailures=%d%n",
+ key, failureCounts.get(key));
+ }
+ }
+
+ static final Reporter reporter = new Reporter();
+
+ static class Result {
+ final int limit;
+ final int ipos;
+ final boolean direct;
+ final byte[] ia;
+ final char[] oa;
+ final CoderResult cr;
+
+ Result(ByteBuffer ib, CharBuffer ob, CoderResult cr) {
+ ipos = ib.position();
+ ia = toArray(ib);
+ oa = toArray(ob);
+ direct = ib.isDirect();
+ limit = ob.limit();
+ this.cr = cr;
+ }
+
+ static byte[] toArray(ByteBuffer b) {
+ int pos = b.position();
+ byte[] a = new byte[b.limit()];
+ b.position(0);
+ b.get(a);
+ b.position(pos);
+ return a;
+ }
+
+ static char[] toArray(CharBuffer b) {
+ char[] a = new char[b.position()];
+ b.position(0);
+ b.get(a);
+ return a;
+ }
+
+ static boolean eq(Result x, Result y) {
+ return x == y ||
+ (x != null && y != null &&
+ (Arrays.equals(x.oa, y.oa) &&
+ x.ipos == y.ipos &&
+ x.cr == y.cr));
+ }
+
+ public String toString() {
+ return String.format("\"%s\"[%d/%d] => %s \"%s\"[%d/%d]%s",
+ string(ia), ipos, ia.length,
+ cr, string(oa), oa.length, limit,
+ (direct ? " (direct)" : ""));
+ }
+ }
+
+ // legend: r=regular d=direct In=Input Ou=Output
+ static final int maxBufSize = 20;
+ static final ByteBuffer[] ribs = new ByteBuffer[maxBufSize];
+ static final ByteBuffer[] dibs = new ByteBuffer[maxBufSize];
+
+ static final CharBuffer[] robs = new CharBuffer[maxBufSize];
+ static final CharBuffer[] dobs = new CharBuffer[maxBufSize];
+ static {
+ for (int i = 0; i < maxBufSize; i++) {
+ ribs[i] = ByteBuffer.allocate(i);
+ dibs[i] = ByteBuffer.allocateDirect(i);
+ robs[i] = CharBuffer.allocate(i);
+ dobs[i] = ByteBuffer.allocateDirect(i*2).asCharBuffer();
+ }
+ }
+
+ static class CharsetTester {
+ private final Charset cs;
+ private static final long maxFailures = 5;
+ private long failures = 0;
+ // private static final long maxCharsetFailures = Long.MAX_VALUE;
+ private static final long maxCharsetFailures = 10000L;
+ private final long failed0 = failed;
+
+ CharsetTester(Charset cs) {
+ this.cs = cs;
+ }
+
+ static boolean bug(String format, Object... args) {
+ return reporter.bug(format, args);
+ }
+
+ Result recode(ByteBuffer ib, CharBuffer ob) {
+ try {
+ char canary = '\u4242';
+ ib.clear(); // Prepare to read
+ ob.clear(); // Prepare to write
+ for (int i = 0; i < ob.limit(); i++)
+ ob.put(i, canary);
+ CharsetDecoder coder = cs.newDecoder();
+ CoderResult cr = coder.decode(ib, ob, false);
+ equal(ib.limit(), ib.capacity());
+ equal(ob.limit(), ob.capacity());
+ Result r = new Result(ib, ob, cr);
+ if (cr.isError())
+ check(cr.length() > 0);
+ if (cr.isOverflow() && ob.remaining() > 10)
+ bug("OVERFLOW, but there's lots of room: %s %s",
+ cs, r);
+// if (cr.isOverflow() && ib.remaining() == 0)
+// bug("OVERFLOW, yet remaining() == 0: %s %s",
+// cs, r);
+ if (cr.isError() && ib.remaining() < cr.length())
+ bug("remaining() < CoderResult.length(): %s %s",
+ cs, r);
+// if (ib.position() == 0 && ob.position() > 0)
+// reporter. bug("output only if input consumed: %s %s",
+// cs, r);
+ // Should we warn if cr.isUnmappable() ??
+ CoderResult cr2 = coder.decode(ib, ob, false);
+ if (ib.position() != r.ipos ||
+ ob.position() != r.oa.length ||
+ cr != cr2)
+ bug("Coding operation not idempotent: %s%n %s%n %s",
+ cs, r, new Result(ib, ob, cr2));
+ if (ob.position() < ob.limit() &&
+ ob.get(ob.position()) != canary)
+ bug("Buffer overrun: %s %s %s",
+ cs, r, ob.get(ob.position()));
+ return r;
+ } catch (Throwable t) {
+ if (bug("Unexpected exception: %s %s %s",
+ cs, t.getClass().getSimpleName(),
+ new Result(ib, ob, null)))
+ t.printStackTrace();
+ return null;
+ }
+ }
+
+ Result recode2(byte[] ia, int n) {
+ int len = ia.length;
+ ByteBuffer rib = ByteBuffer.wrap(ia);
+ ByteBuffer dib = dibs[len];
+ dib.clear(); dib.put(ia); dib.clear();
+ CharBuffer rob = robs[n];
+ CharBuffer dob = dobs[n];
+ equal(rob.limit(), n);
+ equal(dob.limit(), n);
+ check(dib.isDirect());
+ check(dob.isDirect());
+ Result r1 = recode(rib, rob);
+ Result r2 = recode(dib, dob);
+ if (r1 != null && r2 != null && ! Result.eq(r1, r2))
+ bug("Results differ for direct buffers: %s%n %s%n %s",
+ cs, r1, r2);
+ return r1;
+ }
+
+ Result test(byte[] ia) {
+ if (failed - failed0 >= maxCharsetFailures)
+ throw new TooManyFailures();
+
+ Result roomy = recode2(ia, maxBufSize - 1);
+ if (roomy == null) return roomy;
+ int olen = roomy.oa.length;
+ if (olen > 0) {
+ if (roomy.ipos == roomy.ia.length) {
+ Result perfectFit = recode2(ia, olen);
+ if (! Result.eq(roomy, perfectFit))
+ bug("Results differ: %s%n %s%n %s",
+ cs, roomy, perfectFit);
+ }
+ for (int i = 0; i < olen; i++) {
+ Result claustrophobic = recode2(ia, i);
+ if (claustrophobic == null) return roomy;
+ if (roomy.cr.isUnderflow() &&
+ ! claustrophobic.cr.isOverflow())
+ bug("Expected OVERFLOW: %s%n %s%n %s",
+ cs, roomy, claustrophobic);
+ }
+ }
+ return roomy;
+ }
+
+ void testExhaustively(byte[] prefix, int n) {
+ int len = prefix.length;
+ byte[] ia = Arrays.copyOf(prefix, len + 1);
+ for (int i = 0; i < 0x100; i++) {
+ ia[len] = (byte) i;
+ if (n == 1)
+ test(ia);
+ else
+ testExhaustively(ia, n - 1);
+ }
+ }
+
+ void testRandomly(byte[] prefix, int n) {
+ int len = prefix.length;
+ byte[] ia = Arrays.copyOf(prefix, len + n);
+ for (int i = 0; i < 10000; i++) {
+ for (int j = 0; j < n; j++)
+ ia[len + j] = randomByte();
+ test(ia);
+ }
+ }
+
+ void testPrefix(byte[] prefix) {
+ if (prefix.length > 0)
+ System.out.printf("Testing prefix %s%n", string(prefix));
+
+ test(prefix);
+
+ testExhaustively(prefix, 1);
+ testExhaustively(prefix, 2);
+ // Can you spare a week of CPU time?
+ // testExhaustively(cs, tester, prefix, 3);
+
+ testRandomly(prefix, 3);
+ testRandomly(prefix, 4);
+ }
+ }
+
+ private final static Random rnd = new Random();
+ private static byte randomByte() {
+ return (byte) rnd.nextInt(0x100);
+ }
+ private static byte[] randomBytes(int len) {
+ byte[] a = new byte[len];
+ for (int i = 0; i < len; i++)
+ a[i] = randomByte();
+ return a;
+ }
+
+ private static final byte SS2 = (byte) 0x8e;
+ private static final byte SS3 = (byte) 0x8f;
+ private static final byte ESC = (byte) 0x1b;
+ private static final byte SO = (byte) 0x0e;
+ private static final byte SI = (byte) 0x0f;
+
+ private final static byte[][] stateChangers = {
+ {SS2}, {SS3}, {SO}, {SI}
+ };
+
+ private final static byte[][]escapeSequences = {
+ {ESC, '(', 'B'},
+ {ESC, '(', 'I'},
+ {ESC, '(', 'J'},
+ {ESC, '$', '@'},
+ {ESC, '$', 'A'},
+ {ESC, '$', ')', 'A'},
+ {ESC, '$', ')', 'C'},
+ {ESC, '$', ')', 'G'},
+ {ESC, '$', '*', 'H'},
+ {ESC, '$', '+', 'I'},
+ {ESC, '$', 'B'},
+ {ESC, 'N'},
+ {ESC, 'O'},
+ {ESC, '$', '(', 'D'},
+ };
+
+ private static boolean isStateChanger(Charset cs, byte[] ia) {
+ Result r = new CharsetTester(cs).recode2(ia, 9);
+ return r == null ? false :
+ (r.cr.isUnderflow() &&
+ r.ipos == ia.length &&
+ r.oa.length == 0);
+ }
+
+ private final static byte[][] incompletePrefixes = {
+ {ESC},
+ {ESC, '('},
+ {ESC, '$'},
+ {ESC, '$', '(',},
+ };
+
+ private static boolean isIncompletePrefix(Charset cs, byte[] ia) {
+ Result r = new CharsetTester(cs).recode2(ia, 9);
+ return r == null ? false :
+ (r.cr.isUnderflow() &&
+ r.ipos == 0 &&
+ r.oa.length == 0);
+ }
+
+ private static void testCharset(Charset cs) throws Throwable {
+ final String csn = cs.name();
+
+ if (isBroken(csn)) {
+ System.out.printf("Skipping possibly broken charset %s%n", csn);
+ return;
+ }
+ System.out.println(csn);
+ CharsetTester tester = new CharsetTester(cs);
+
+ tester.testPrefix(new byte[0]);
+
+ if (! csn.matches("(?:x-)?(?:UTF|JIS(?:_X)?0).*")) {
+ for (byte[] prefix : stateChangers)
+ if (isStateChanger(cs, prefix))
+ tester.testPrefix(prefix);
+
+ for (byte[] prefix : incompletePrefixes)
+ if (isIncompletePrefix(cs, prefix))
+ tester.testPrefix(prefix);
+
+ if (isIncompletePrefix(cs, new byte[] {ESC}))
+ for (byte[] prefix : escapeSequences)
+ if (isStateChanger(cs, prefix))
+ tester.testPrefix(prefix);
+ }
+ }
+
+ private static void realMain(String[] args) {
+ for (Charset cs : sort(Charset.availableCharsets().values())) {
+ try {
+ testCharset(cs);
+ } catch (TooManyFailures e) {
+ System.out.printf("Too many failures for %s%n", cs);
+ } catch (Throwable t) {
+ unexpected(t);
+ }
+ }
+ reporter.summarize();
+ }
+
+ //--------------------- Infrastructure ---------------------------
+ static volatile long passed = 0, failed = 0;
+ static void pass() {passed++;}
+ static void fail() {failed++; Thread.dumpStack();}
+ static void fail(String format, Object... args) {
+ System.out.println(String.format(format, args)); failed++;}
+ static void fail(String msg) {System.out.println(msg); fail();}
+ static void unexpected(Throwable t) {failed++; t.printStackTrace();}
+ static void check(boolean cond) {if (cond) pass(); else fail();}
+ static void equal(Object x, Object y) {
+ if (x == null ? y == null : x.equals(y)) pass();
+ else fail(x + " not equal to " + y);}
+ public static void main(String[] args) throws Throwable {
+ try {realMain(args);} catch (Throwable t) {unexpected(t);}
+ System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+ if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/FindEncoderBugs.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,529 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6233345 6381699 6381702 6381705 6381706
+ * @summary Encode many char sequences in many ways
+ * @run main/timeout=1200 FindEncoderBugs
+ * @author Martin Buchholz
+ */
+
+import java.util.*;
+import java.util.regex.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class FindEncoderBugs {
+
+ static boolean isBroken(String csn) {
+ if (csn.equals("x-COMPOUND_TEXT")) return true;
+ if (csn.equals("x-IBM834")) return true; // stateful korean
+ if (csn.equals("x-IBM933")) return true; // stateful korean
+ if (csn.equals("x-IBM970")) return true; // stateful korean
+ if (csn.equals("x-IBM949")) return true; // stateful korean
+ if (csn.equals("x-IBM949C")) return true; // stateful korean
+ return false;
+ }
+
+ static <T extends Comparable<? super T>> List<T> sort(Collection<T> c) {
+ List<T> list = new ArrayList<T>(c);
+ Collections.sort(list);
+ return list;
+ }
+
+ static class TooManyFailures extends RuntimeException {
+ private static final long serialVersionUID = 0L;
+ }
+
+ static String string(byte[] a) {
+ final StringBuilder sb = new StringBuilder();
+ for (byte b : a) {
+ if (sb.length() != 0) sb.append(' ');
+ sb.append(String.format("%02x", b & 0xff));
+ }
+ return sb.toString();
+ }
+
+ static String string(char[] a) {
+ final StringBuilder sb = new StringBuilder();
+ for (char c : a) {
+ if (sb.length() != 0) sb.append(' ');
+ sb.append(String.format("\\u%04x", (int) c));
+ }
+ return sb.toString();
+ }
+
+ static class Reporter {
+ // Some machinery to make sure only a small number of errors
+ // that are "too similar" are reported.
+ static class Counts extends HashMap<String, Long> {
+ private static final long serialVersionUID = -1;
+ long inc(String signature) {
+ Long count = get(signature);
+ if (count == null) count = 0L;
+ put(signature, count+1);
+ return count+1;
+ }
+ }
+
+ final Counts failureCounts = new Counts();
+ final static long maxFailures = 2;
+
+ final static Pattern hideBytes = Pattern.compile("\"[0-9a-f ]+\"");
+ final static Pattern hideChars = Pattern.compile("\\\\u[0-9a-f]{4}");
+
+ boolean bug(String format, Object... args) {
+ String signature = String.format(format, args);
+ // signature = hideBytes.matcher(signature).replaceAll("\"??\"");
+ // signature = hideChars.matcher(signature).replaceAll("\\u????");
+ failed++;
+ if (failureCounts.inc(signature) <= maxFailures) {
+ System.out.printf(format, args);
+ System.out.println();
+ return true;
+ }
+ return false;
+ }
+
+ void summarize() {
+ for (String key : sort(failureCounts.keySet()))
+ System.out.printf("-----%n%s%nfailures=%d%n",
+ key, failureCounts.get(key));
+ }
+ }
+
+ static final Reporter reporter = new Reporter();
+
+ static class Result {
+ final int limit;
+ final int ipos;
+ final boolean direct;
+ final char[] ia;
+ final byte[] oa;
+ final CoderResult cr;
+
+ private static byte[] toByteArray(ByteBuffer bb) {
+ byte[] bytes = new byte[bb.position()];
+ for (int i = 0; i < bytes.length; i++)
+ bytes[i] = bb.get(i);
+ return bytes;
+ }
+
+ Result(CharBuffer ib, ByteBuffer ob, CoderResult cr) {
+ ipos = ib.position();
+ ia = toArray(ib);
+ oa = toArray(ob);
+ direct = ib.isDirect();
+ limit = ob.limit();
+ this.cr = cr;
+ }
+
+ static char[] toArray(CharBuffer b) {
+ int pos = b.position();
+ char[] a = new char[b.limit()];
+ b.position(0);
+ b.get(a);
+ b.position(pos);
+ return a;
+ }
+
+ static byte[] toArray(ByteBuffer b) {
+ byte[] a = new byte[b.position()];
+ b.position(0);
+ b.get(a);
+ return a;
+ }
+
+ static boolean eq(Result x, Result y) {
+ return x == y ||
+ (x != null && y != null &&
+ (Arrays.equals(x.oa, y.oa) &&
+ x.ipos == y.ipos &&
+ x.cr == y.cr));
+ }
+
+ public String toString() {
+ return String.format("\"%s\"[%d/%d] => %s \"%s\"[%d/%d]%s",
+ string(ia), ipos, ia.length,
+ cr, string(oa), oa.length, limit,
+ (direct ? " (direct)" : ""));
+ }
+ }
+
+ static class CharsetTester {
+ private final Charset cs;
+ private final boolean hasBom;
+ private static final int maxFailures = 5;
+ private int failures = 0;
+ // private static final long maxCharsetFailures = Long.MAX_VALUE;
+ private static final long maxCharsetFailures = 10000L;
+ private final long failed0 = failed;
+
+ // legend: r=regular d=direct In=Input Ou=Output
+ static final int maxBufSize = 20;
+ static final CharBuffer[] rInBuffers = new CharBuffer[maxBufSize];
+ static final CharBuffer[] dInBuffers = new CharBuffer[maxBufSize];
+
+ static final ByteBuffer[] rOuBuffers = new ByteBuffer[maxBufSize];
+ static final ByteBuffer[] dOuBuffers = new ByteBuffer[maxBufSize];
+ static {
+ for (int i = 0; i < maxBufSize; i++) {
+ rInBuffers[i] = CharBuffer.allocate(i);
+ dInBuffers[i] = ByteBuffer.allocateDirect(i*2).asCharBuffer();
+ rOuBuffers[i] = ByteBuffer.allocate(i);
+ dOuBuffers[i] = ByteBuffer.allocateDirect(i);
+ }
+ }
+
+ CharsetTester(Charset cs) {
+ this.cs = cs;
+ this.hasBom =
+ cs.name().matches(".*BOM.*") ||
+ cs.name().equals("UTF-16");
+ }
+
+ static boolean bug(String format, Object... args) {
+ return reporter.bug(format, args);
+ }
+
+ static boolean hasBom(byte[] a) {
+ switch (a.length) {
+ case 2: case 4:
+ int sum = 0;
+ for (byte x : a)
+ sum += x;
+ return sum == (byte) 0xfe + (byte) 0xff;
+ default: return false;
+ }
+ }
+
+ void testSurrogates() {
+ int failures = 0;
+ for (int i = 0; i < 10; i++) {
+ Result r = test(new char[] { randomHighSurrogate() });
+ if (r == null) break;
+ if (! (r.cr.isUnderflow() &&
+ r.ipos == 0))
+ bug("Lone high surrogate not UNDERFLOW: %s %s",
+ cs, r);
+ }
+ for (int i = 0; i < 10; i++) {
+ Result r = test(new char[] { randomLowSurrogate() });
+ if (r == null) break;
+ if (! (r.cr.isMalformed() && r.cr.length() == 1))
+ bug("Lone low surrogate not MALFORMED[1]: %s %s",
+ cs, r);
+ }
+ char[] chars = new char[2];
+ for (int i = 0; i < 10; i++) {
+ chars[0] = randomLowSurrogate(); // Always illegal
+ chars[1] = randomChar();
+ Result r = test(chars);
+ if (r == null) break;
+ if (! (r.cr.isMalformed() &&
+ r.cr.length() == 1 &&
+ (r.ipos == 0 || (hasBom && hasBom(r.oa))))) {
+ if (failures++ > 5) return;
+ bug("Unpaired low surrogate not MALFORMED[1]: %s %s",
+ cs, r);
+ }
+ }
+ for (int i = 0; i < 10; i++) {
+ chars[0] = randomHighSurrogate();
+ do {
+ chars[1] = randomChar();
+ } while (Character.isLowSurrogate(chars[1]));
+ Result r = test(chars);
+ if (r == null) break;
+ if (! (r.cr.isMalformed() &&
+ r.cr.length() == 1 &&
+ (r.ipos == 0 || (hasBom && hasBom(r.oa))))) {
+ if (failures++ > 5) return;
+ bug("Unpaired high surrogate not MALFORMED[1]: %s %s",
+ cs, r);
+ }
+ }
+ for (int i = 0; i < 1000; i++) {
+ chars[0] = randomHighSurrogate();
+ chars[1] = randomLowSurrogate();
+ Result r = test(chars);
+ if (r == null) break;
+ if (! ((r.cr.isUnmappable() &&
+ r.cr.length() == 2 &&
+ r.oa.length == 0)
+ ||
+ (r.cr.isUnderflow() &&
+ r.oa.length > 0 &&
+ r.ipos == 2))) {
+ if (failures++ > 5) return;
+ bug("Legal supplementary character bug: %s %s",
+ cs, r);
+ }
+ }
+ }
+
+// if (! (r.cr.isMalformed() &&
+// r.cr.length() == 1 &&
+// (rob.position() == 0 || hasBom(rob)))) {
+// if (failures++ > 5) return;
+// bug("Unpaired surrogate not malformed: %s %s",
+// cs, r);
+// }
+// }
+
+// dib.clear(); dib.put(chars); dib.flip();
+// rib.position(0);
+// rob.clear(); rob.limit(lim);
+// for (CharBuffer ib : new CharBuffer[] { rib, dib }) {
+// Result r = recode(ib, rob);
+// if (! (r.cr.isMalformed() &&
+// r.cr.length() == 1 &&
+// (rob.position() == 0 || hasBom(rob)))) {
+// if (failures++ > 5) return;
+// bug("Unpaired surrogate not malformed: %s %s",
+// cs, r);
+// }
+// }
+// //}
+// for (int i = 0; i < 10000; i++) {
+// chars[0] = randomHighSurrogate();
+// chars[1] = randomLowSurrogate();
+// dib.clear(); dib.put(chars); dib.flip();
+// rib.position(0);
+// rob.clear(); rob.limit(lim);
+// for (CharBuffer ib : new CharBuffer[] { rib, dib }) {
+// Result r = recode(ib, rob);
+// if (! ((r.cr.isUnmappable() &&
+// r.cr.length() == 2 &&
+// rob.position() == 0)
+// ||
+// (r.cr.isUnderflow() &&
+// rob.position() > 0 &&
+// ib.position() == 2))) {
+// if (failures++ > 5) return;
+// bug("Legal supplementary character bug: %s %s",
+// cs, r);
+// }
+// }
+// }
+// }
+// }
+
+ Result recode(CharBuffer ib, ByteBuffer ob) {
+ try {
+ byte canary = 22;
+ ib.clear(); // Prepare to read
+ ob.clear(); // Prepare to write
+ for (int i = 0; i < ob.limit(); i++)
+ ob.put(i, canary);
+ CharsetEncoder coder = cs.newEncoder();
+ CoderResult cr = coder.encode(ib, ob, false);
+ equal(ib.limit(), ib.capacity());
+ equal(ob.limit(), ob.capacity());
+ Result r = new Result(ib, ob, cr);
+ if (cr.isError())
+ check(cr.length() > 0);
+ if (cr.isOverflow() && ob.remaining() > 10)
+ bug("OVERFLOW, but there's lots of room: %s %s",
+ cs, r);
+// if (cr.isOverflow() && ib.remaining() == 0 && ! hasBom)
+// bug("OVERFLOW, yet remaining() == 0: %s %s",
+// cs, r);
+ if (cr.isError() && ib.remaining() < cr.length())
+ bug("remaining() < CoderResult.length(): %s %s",
+ cs, r);
+// if (ib.position() == 0
+// && ob.position() > 0
+// && ! hasBom(r.oa))
+// bug("output only if input consumed: %s %s",
+// cs, r);
+ CoderResult cr2 = coder.encode(ib, ob, false);
+ if (ib.position() != r.ipos ||
+ ob.position() != r.oa.length ||
+ cr != cr2)
+ bug("Coding operation not idempotent: %s%n %s%n %s",
+ cs, r, new Result(ib, ob, cr2));
+ if (ob.position() < ob.limit() &&
+ ob.get(ob.position()) != canary)
+ bug("Buffer overrun: %s %s %s",
+ cs, r, ob.get(ob.position()));
+ return r;
+ } catch (Throwable t) {
+ if (bug("Unexpected exception: %s %s %s",
+ cs, t.getClass().getSimpleName(),
+ new Result(ib, ob, null)))
+ t.printStackTrace();
+ return null;
+ }
+ }
+
+ Result recode2(char[] ia, int n) {
+ int len = ia.length;
+ CharBuffer rib = CharBuffer.wrap(ia);
+ CharBuffer dib = dInBuffers[len];
+ dib.clear(); dib.put(ia); dib.clear();
+ ByteBuffer rob = rOuBuffers[n];
+ ByteBuffer dob = dOuBuffers[n];
+ equal(rob.limit(), n);
+ equal(dob.limit(), n);
+ check(dib.isDirect());
+ check(dob.isDirect());
+ Result r1 = recode(rib, rob);
+ Result r2 = recode(dib, dob);
+ if (r1 != null && r2 != null && ! Result.eq(r1, r2))
+ bug("Results differ for direct buffers: %s%n %s%n %s",
+ cs, r1, r2);
+ return r1;
+ }
+
+ Result test(char[] ia) {
+ if (failed - failed0 >= maxCharsetFailures)
+ throw new TooManyFailures();
+
+ Result roomy = recode2(ia, maxBufSize - 1);
+ if (roomy == null) return roomy;
+ int olen = roomy.oa.length;
+ if (olen > 0) {
+ if (roomy.ipos == roomy.ia.length) {
+ Result perfectFit = recode2(ia, olen);
+ if (! Result.eq(roomy, perfectFit))
+ bug("Results differ: %s%n %s%n %s",
+ cs, roomy, perfectFit);
+ }
+ for (int i = 0; i < olen; i++) {
+ Result claustrophobic = recode2(ia, i);
+ if (claustrophobic == null) return roomy;
+ if (roomy.cr.isUnderflow() &&
+ ! claustrophobic.cr.isOverflow())
+ bug("Expected OVERFLOW: %s%n %s%n %s",
+ cs, roomy, claustrophobic);
+ }
+ }
+ return roomy;
+ }
+
+ void testExhaustively(char[] prefix, int n) {
+ int len = prefix.length;
+ char[] ia = Arrays.copyOf(prefix, len + 1);
+ for (int i = 0; i < 0x10000; i++) {
+ ia[len] = (char) i;
+ if (n == 1)
+ test(ia);
+ else
+ testExhaustively(ia, n - 1);
+ }
+ }
+
+ void testRandomly(char[] prefix, int n) {
+ int len = prefix.length;
+ char[] ia = Arrays.copyOf(prefix, len + n);
+ for (int i = 0; i < 10000; i++) {
+ for (int j = 0; j < n; j++)
+ ia[len + j] = randomChar();
+ test(ia);
+ }
+ }
+
+ void testPrefix(char[] prefix) {
+ if (prefix.length > 0)
+ System.out.printf("Testing prefix %s%n", string(prefix));
+
+ test(prefix);
+
+ testExhaustively(prefix, 1);
+ // Can you spare a year of CPU time?
+ //testExhaustively(prefix, 2);
+
+ testRandomly(prefix, 2);
+ testRandomly(prefix, 3);
+ }
+ }
+
+ private final static Random rnd = new Random();
+ private static char randomChar() {
+ return (char) rnd.nextInt(Character.MAX_VALUE);
+ }
+ private static char randomHighSurrogate() {
+ return (char) (Character.MIN_HIGH_SURROGATE + rnd.nextInt(1024));
+ }
+ private static char randomLowSurrogate() {
+ return (char) (Character.MIN_LOW_SURROGATE + rnd.nextInt(1024));
+ }
+
+ private static void testCharset(Charset cs) throws Throwable {
+ if (! cs.canEncode())
+ return;
+
+ final String csn = cs.name();
+
+ if (isBroken(csn)) {
+ System.out.printf("Skipping possibly broken charset %s%n", csn);
+ return;
+ }
+ System.out.println(csn);
+
+ CharsetTester tester = new CharsetTester(cs);
+
+ tester.testSurrogates();
+
+ tester.testPrefix(new char[] {});
+
+ if (csn.equals("x-ISCII91")) {
+ System.out.println("More ISCII testing...");
+ new CharsetTester(cs).testPrefix(new char[]{'\u094d'}); // Halant
+ new CharsetTester(cs).testPrefix(new char[]{'\u093c'}); // Nukta
+ }
+ }
+
+ private static void realMain(String[] args) {
+ for (Charset cs : sort(Charset.availableCharsets().values())) {
+ try {
+ testCharset(cs);
+ } catch (TooManyFailures e) {
+ System.out.printf("Too many failures for %s%n", cs);
+ } catch (Throwable t) {
+ unexpected(t);
+ }
+ }
+ reporter.summarize();
+ }
+
+ //--------------------- Infrastructure ---------------------------
+ static volatile long passed = 0, failed = 0;
+ static void pass() {passed++;}
+ static void fail() {failed++; Thread.dumpStack();}
+ static void fail(String format, Object... args) {
+ System.out.println(String.format(format, args)); failed++;}
+ static void fail(String msg) {System.out.println(msg); fail();}
+ static void unexpected(Throwable t) {failed++; t.printStackTrace();}
+ static void check(boolean cond) {if (cond) pass(); else fail();}
+ static void equal(Object x, Object y) {
+ if (x == null ? y == null : x.equals(y)) pass();
+ else fail(x + " not equal to " + y);}
+ public static void main(String[] args) throws Throwable {
+ try {realMain(args);} catch (Throwable t) {unexpected(t);}
+ System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+ if (failed > 0) throw new AssertionError("Some tests failed");}
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/FindOneCharEncoderBugs.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 5058133 6233345 6381699 6381702 6381705 6381706
+ * @summary Check that all one-char sequences can be encoded by all charsets
+ * @run main/timeout=1200 FindOneCharEncoderBugs
+ * @author Martin Buchholz
+ */
+
+import java.util.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class FindOneCharEncoderBugs {
+ final static String[] brokenCharsets = {
+ // Delete the following lines when these charsets are fixed!
+ "x-IBM970",
+ "x-COMPOUND_TEXT", // Direct buffers not supported
+ };
+
+ private static boolean equals(byte[] ba, ByteBuffer bb) {
+ if (ba.length != bb.limit())
+ return false;
+ for (int i = 0; i < ba.length; i++)
+ if (ba[i] != bb.get(i))
+ return false;
+ return true;
+ }
+
+ private static String toString(byte[] bytes) {
+ final StringBuilder sb = new StringBuilder();
+ for (byte b : bytes) {
+ if (sb.length() != 0) sb.append(' ');
+ sb.append(String.format("%02x", (int)b));
+ }
+ return sb.toString();
+ }
+
+ private static String toString(ByteBuffer bb) {
+ final StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < bb.limit(); i++) {
+ if (sb.length() != 0) sb.append(' ');
+ sb.append(String.format("%02x", (int)bb.get(i)));
+ }
+ return sb.toString();
+ }
+
+ private static ByteBuffer convert(Charset cs, char c, CharBuffer cb) throws Throwable {
+ cb.clear(); cb.put(c); cb.flip();
+ return cs.newEncoder()
+ .onUnmappableCharacter(CodingErrorAction.REPLACE)
+ .onMalformedInput(CodingErrorAction.REPLACE)
+ .encode(cb);
+ }
+
+ /** Returns a direct CharBuffer with the same capacity as ordinary CharBuffer ocb */
+ private static CharBuffer directCharBuffer(CharBuffer ocb) {
+ final CharBuffer dcb =
+ ByteBuffer.allocateDirect(ocb.capacity() * Character.SIZE / Byte.SIZE)
+ .asCharBuffer();
+ check(! ocb.isDirect());
+ check( dcb.isDirect());
+ equal(ocb.capacity(), dcb.capacity());
+ return dcb;
+ }
+
+ private static void testChar(byte[] expected, CharBuffer cb, Charset cs, char c) {
+ try {
+ final ByteBuffer bb = convert(cs, c, cb);
+ if (! equals(expected, bb))
+ fail("bytes differ charset=%s direct=%s char=\\u%04x%n%s%n%s",
+ cs, cb.isDirect(), (int)c,
+ toString(expected), toString(bb));
+ } catch (Throwable t) {
+ System.out.printf("Unexpected exception charset=%s direct=%s char=\\u%04x%n",
+ cs, cb.isDirect(), (int)c);
+ unexpected(t);
+ failed++;
+ }
+ }
+
+ private static void testCharset(Charset cs) throws Throwable {
+ if (! cs.canEncode())
+ return;
+
+ final String csn = cs.name();
+
+ for (String n : brokenCharsets)
+ if (csn.equals(n)) {
+ System.out.printf("Skipping possibly broken charset %s%n", csn);
+ return;
+ }
+ System.out.println(csn);
+
+ final char[] theChar = new char[1];
+ final CharBuffer ocb = CharBuffer.allocate(1);
+ final CharBuffer dcb = directCharBuffer(ocb);
+ final int maxFailuresPerCharset = 5;
+ final int failed0 = failed;
+
+ for (char c = '\u0000';
+ (c+1 != 0x10000) && (failed - failed0 < maxFailuresPerCharset);
+ c++) {
+ theChar[0] = c;
+ byte[] bytes = new String(theChar).getBytes(csn);
+ if (bytes.length == 0)
+ fail("Empty output?! charset=%s char=\\u%04x", cs, (int)c);
+ testChar(bytes, ocb, cs, c);
+ testChar(bytes, dcb, cs, c);
+ }
+ }
+
+ private static void realMain(String[] args) {
+ for (Charset cs : Charset.availableCharsets().values()) {
+ try { testCharset(cs); }
+ catch (Throwable t) { unexpected(t); }
+ }
+ }
+
+ //--------------------- Infrastructure ---------------------------
+ static volatile int passed = 0, failed = 0;
+ static void pass() {passed++;}
+ static void fail() {failed++; Thread.dumpStack();}
+ static void fail(String format, Object... args) {
+ System.out.println(String.format(format, args)); failed++;}
+ static void fail(String msg) {System.out.println(msg); fail();}
+ static void unexpected(Throwable t) {failed++; t.printStackTrace();}
+ static void check(boolean cond) {if (cond) pass(); else fail();}
+ static void equal(Object x, Object y) {
+ if (x == null ? y == null : x.equals(y)) pass();
+ else fail(x + " not equal to " + y);}
+ public static void main(String[] args) throws Throwable {
+ try {realMain(args);} catch (Throwable t) {unexpected(t);}
+ System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+ if (failed > 0) throw new AssertionError("Some tests failed");}
+ private static abstract class Fun {abstract void f() throws Throwable;}
+ static void THROWS(Class<? extends Throwable> k, Fun... fs) {
+ for (Fun f : fs)
+ try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
+ catch (Throwable t) {
+ if (k.isAssignableFrom(t.getClass())) pass();
+ else unexpected(t);}}
+ private static abstract class CheckedThread extends Thread {
+ abstract void realRun() throws Throwable;
+ public void run() {
+ try {realRun();} catch (Throwable t) {unexpected(t);}}}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/HWKatakanaMS932EncodeTest.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4715330
+ @summary Check MS932/windows-31j encoding (char->byte) for halfwidth katakana chars
+ */
+
+/*
+ * Tests encodeability of the Unicode defined Halfwidth Katakana
+ * characters using the MS932/windows-31j encoder
+ */
+
+public class HWKatakanaMS932EncodeTest {
+ public static void main(String[] args) throws Exception {
+
+ char[] testChars = new char[1];
+ byte[] testBytes = new byte[1];
+ int offset = 0;
+ String encoding = "windows-31j";
+
+ // Halfwidth Katakana chars run from U+FF61 --> U+FF9F
+ // and their native equivalents in Code page 932 run
+ // sequentially from 0xa1 --> 0xdf
+
+ for (int lsByte = 0x61 ; lsByte <= 0x9F; lsByte++, offset++) {
+ testChars[0] = (char) (lsByte | 0xFF00);
+ String s = new String(testChars);
+ testBytes = s.getBytes(encoding);
+ if ( testBytes[0] != (byte)(0xa1 + offset))
+ throw new Exception("failed Test");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/ISCIITest.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,350 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4328178
+ @summary Performs baseline and regression test on the ISCII91 charset
+ */
+
+import java.io.*;
+
+public class ISCIITest {
+
+ private static void failureReport() {
+ System.err.println ("Failed ISCII91 Regression Test");
+ }
+
+ private static void mapEquiv(int start,
+ int end,
+ String testName)
+ throws Exception
+ {
+ byte[] singleByte = new byte[1];
+ byte[] encoded = new byte[1];
+
+ for (int i = start; i <= end; i++ ) {
+ singleByte[0] = (byte) i;
+ try {
+ String unicodeStr =
+ new String (singleByte,"ISCII91");
+
+ if (i != (int)unicodeStr.charAt(0)) {
+ System.err.println ("FAILED ISCII91 Regression test"
+ + "input byte is " + i );
+ throw new Exception("");
+ }
+ encoded = unicodeStr.getBytes("ISCII91");
+
+ if (encoded[0] != singleByte[0]) {
+ System.err.println("Encoding error " + testName);
+ throw new Exception("Failed ISCII91 Regression test");
+ }
+
+ } catch (UnsupportedEncodingException e) {
+ failureReport();
+ }
+ }
+ return;
+ }
+
+ private static void checkUnmapped(int start,
+ int end,
+ String testName)
+ throws Exception {
+
+ byte[] singleByte = new byte[1];
+
+ for (int i = start; i <= end; i++ ) {
+ singleByte[0] = (byte) i;
+ try {
+ String unicodeStr = new String (singleByte, "ISCII91");
+
+ if (unicodeStr.charAt(0) != '\uFFFD') {
+ System.err.println("FAILED " + testName +
+ "input byte is " + i );
+ throw new Exception ("Failed ISCII91 regression test");
+ }
+ } catch (UnsupportedEncodingException e) {
+ System.err.println("Unsupported character encoding");
+ }
+ }
+ return;
+ }
+
+ /*
+ *
+ */
+ private static void checkRange(int start, int end,
+ char[] expectChars,
+ String testName)
+ throws Exception {
+ byte[] singleByte = new byte[1];
+ byte[] encoded = new byte[1];
+ int lookupOffset = 0;
+
+ for (int i=start; i <= end; i++ ) {
+ singleByte[0] = (byte) i;
+ String unicodeStr = new String (singleByte, "ISCII91");
+ if (unicodeStr.charAt(0) != expectChars[lookupOffset++]) {
+ throw new Exception ("Failed ISCII91 Regression Test");
+ }
+ encoded = unicodeStr.getBytes("ISCII");
+ }
+ return;
+ }
+
+ /*
+ * Tests the ISCII91 Indic character encoding
+ * as per IS 13194:1991 Bureau of Indian Standards.
+ */
+
+ private static void test () throws Exception {
+
+ try {
+
+
+ // ISCII91 is an 8-byte encoding which retains the ASCII
+ // mappings in the lower half.
+
+ mapEquiv(0, 0x7f, "7 bit ASCII range");
+
+ // Checks a range of characters which are unmappable according
+ // to the standards.
+
+ checkUnmapped(0x81, 0x9f, "UNMAPPED");
+
+ // Vowel Modifier chars can be used to modify the vowel
+ // sound of the preceding consonant, vowel or matra character.
+
+ byte[] testByte = new byte[1];
+ char[] vowelModChars = {
+ '\u0901', // Vowel modifier Chandrabindu
+ '\u0902', // Vowel modifier Anuswar
+ '\u0903' // Vowel modifier Visarg
+ };
+
+ checkRange(0xa1, 0xa3, vowelModChars, "INDIC VOWEL MODIFIER CHARS");
+
+ char[] expectChars = {
+ '\u0905', // a4 -- Vowel A
+ '\u0906', // a5 -- Vowel AA
+ '\u0907', // a6 -- Vowel I
+ '\u0908', // a7 -- Vowel II
+ '\u0909', // a8 -- Vowel U
+ '\u090a', // a9 -- Vowel UU
+ '\u090b', // aa -- Vowel RI
+ '\u090e', // ab -- Vowel E ( Southern Scripts )
+ '\u090f', // ac -- Vowel EY
+ '\u0910', // ad -- Vowel AI
+ '\u090d', // ae -- Vowel AYE ( Devanagari Script )
+ '\u0912', // af -- Vowel O ( Southern Scripts )
+ '\u0913', // b0 -- Vowel OW
+ '\u0914', // b1 -- Vowel AU
+ '\u0911', // b2 -- Vowel AWE ( Devanagari Script )
+ };
+
+ checkRange(0xa4, 0xb2, expectChars, "INDIC VOWELS");
+
+ char[] expectConsChars =
+ {
+ '\u0915', // b3 -- Consonant KA
+ '\u0916', // b4 -- Consonant KHA
+ '\u0917', // b5 -- Consonant GA
+ '\u0918', // b6 -- Consonant GHA
+ '\u0919', // b7 -- Consonant NGA
+ '\u091a', // b8 -- Consonant CHA
+ '\u091b', // b9 -- Consonant CHHA
+ '\u091c', // ba -- Consonant JA
+ '\u091d', // bb -- Consonant JHA
+ '\u091e', // bc -- Consonant JNA
+ '\u091f', // bd -- Consonant Hard TA
+ '\u0920', // be -- Consonant Hard THA
+ '\u0921', // bf -- Consonant Hard DA
+ '\u0922', // c0 -- Consonant Hard DHA
+ '\u0923', // c1 -- Consonant Hard NA
+ '\u0924', // c2 -- Consonant Soft TA
+ '\u0925', // c3 -- Consonant Soft THA
+ '\u0926', // c4 -- Consonant Soft DA
+ '\u0927', // c5 -- Consonant Soft DHA
+ '\u0928', // c6 -- Consonant Soft NA
+ '\u0929', // c7 -- Consonant NA ( Tamil )
+ '\u092a', // c8 -- Consonant PA
+ '\u092b', // c9 -- Consonant PHA
+ '\u092c', // ca -- Consonant BA
+ '\u092d', // cb -- Consonant BHA
+ '\u092e', // cc -- Consonant MA
+ '\u092f', // cd -- Consonant YA
+ '\u095f', // ce -- Consonant JYA ( Bengali, Assamese & Oriya )
+ '\u0930', // cf -- Consonant RA
+ '\u0931', // d0 -- Consonant Hard RA ( Southern Scripts )
+ '\u0932', // d1 -- Consonant LA
+ '\u0933', // d2 -- Consonant Hard LA
+ '\u0934', // d3 -- Consonant ZHA ( Tamil & Malayalam )
+ '\u0935', // d4 -- Consonant VA
+ '\u0936', // d5 -- Consonant SHA
+ '\u0937', // d6 -- Consonant Hard SHA
+ '\u0938', // d7 -- Consonant SA
+ '\u0939', // d8 -- Consonant HA
+ };
+
+ checkRange(0xb3, 0xd8, expectConsChars, "INDIC CONSONANTS");
+
+ char[] matraChars = {
+ '\u093e', // da -- Vowel Sign AA
+ '\u093f', // db -- Vowel Sign I
+ '\u0940', // dc -- Vowel Sign II
+ '\u0941', // dd -- Vowel Sign U
+ '\u0942', // de -- Vowel Sign UU
+ '\u0943', // df -- Vowel Sign RI
+ '\u0946', // e0 -- Vowel Sign E ( Southern Scripts )
+ '\u0947', // e1 -- Vowel Sign EY
+ '\u0948', // e2 -- Vowel Sign AI
+ '\u0945', // e3 -- Vowel Sign AYE ( Devanagari Script )
+ '\u094a', // e4 -- Vowel Sign O ( Southern Scripts )
+ '\u094b', // e5 -- Vowel Sign OW
+ '\u094c', // e6 -- Vowel Sign AU
+ '\u0949' // e7 -- Vowel Sign AWE ( Devanagari Script )
+ };
+
+ // Matras or Vowel signs alter the implicit
+ // vowel sound associated with an Indic consonant.
+
+ checkRange(0xda, 0xe7, matraChars, "INDIC MATRAS");
+
+ char[] loneContextModifierChars = {
+ '\u094d', // e8 -- Vowel Omission Sign ( Halant )
+ '\u093c', // e9 -- Diacritic Sign ( Nukta )
+ '\u0964' // ea -- Full Stop ( Viram, Northern Scripts )
+ };
+
+ checkRange(0xe8, 0xea,
+ loneContextModifierChars, "LONE INDIC CONTEXT CHARS");
+
+
+ // Test Indic script numeral chars
+ // (as opposed to international numerals)
+
+ char[] expectNumeralChars =
+ {
+ '\u0966', // f1 -- Digit 0
+ '\u0967', // f2 -- Digit 1
+ '\u0968', // f3 -- Digit 2
+ '\u0969', // f4 -- Digit 3
+ '\u096a', // f5 -- Digit 4
+ '\u096b', // f6 -- Digit 5
+ '\u096c', // f7 -- Digit 6
+ '\u096d', // f8 -- Digit 7
+ '\u096e', // f9 -- Digit 8
+ '\u096f' // fa -- Digit 9
+ };
+
+ checkRange(0xf1, 0xfa,
+ expectNumeralChars, "NUMERAL/DIGIT CHARACTERS");
+ int lookupOffset = 0;
+
+ char[] expectNuktaSub = {
+ '\u0950',
+ '\u090c',
+ '\u0961',
+ '\u0960',
+ '\u0962',
+ '\u0963',
+ '\u0944',
+ '\u093d'
+ };
+
+ /*
+ * ISCII uses a number of code extension techniques
+ * to access a number of lesser used characters.
+ * The Nukta character which ordinarily signifies
+ * a diacritic is used in combination with existing
+ * characters to escape them to a different character.
+ * value.
+ */
+
+ byte[] codeExtensionBytes = {
+ (byte)0xa1 , (byte)0xe9, // Chandrabindu + Nukta
+ // =>DEVANAGARI OM SIGN
+ (byte)0xa6 , (byte)0xe9, // Vowel I + Nukta
+ // => DEVANAGARI VOCALIC L
+ (byte)0xa7 , (byte)0xe9, // Vowel II + Nukta
+ // => DEVANAGARI VOCALIC LL
+ (byte)0xaa , (byte)0xe9, // Vowel RI + Nukta
+ // => DEVANAGARI VOCALIC RR
+ (byte)0xdb , (byte)0xe9, // Vowel sign I + Nukta
+ // => DEVANAGARI VOWEL SIGN VOCALIC L
+ (byte)0xdc , (byte)0xe9, // Vowel sign II + Nukta
+ // => DEVANAGARI VOWEL SIGN VOCALIC LL
+
+ (byte)0xdf , (byte)0xe9, // Vowel sign Vocalic R + Nukta
+ // => DEVANAGARI VOWEL SIGN VOCALIC RR
+ (byte)0xea , (byte)0xe9 // Full stop/Phrase separator + Nukta
+ // => DEVANAGARI SIGN AVAGRAHA
+ };
+
+ lookupOffset = 0;
+ byte[] bytePair = new byte[2];
+
+ for (int i=0; i < (codeExtensionBytes.length)/2; i++ ) {
+ bytePair[0] = (byte) codeExtensionBytes[lookupOffset++];
+ bytePair[1] = (byte) codeExtensionBytes[lookupOffset++];
+
+ String unicodeStr = new String (bytePair,"ISCII91");
+ if (unicodeStr.charAt(0) != expectNuktaSub[i]) {
+ throw new Exception("Failed Nukta Sub");
+ }
+ }
+
+ lookupOffset = 0;
+ byte[] comboBytes = {
+ (byte)0xe8 , (byte)0xe8, //HALANT + HALANT
+ (byte)0xe8 , (byte)0xe9 //HALANT + NUKTA aka. Soft Halant
+ };
+ char[] expectCombChars = {
+ '\u094d',
+ '\u200c',
+ '\u094d',
+ '\u200d'
+ };
+
+ for (int i=0; i < (comboBytes.length)/2; i++ ) {
+ bytePair[0] = (byte) comboBytes[lookupOffset++];
+ bytePair[1] = (byte) comboBytes[lookupOffset];
+ String unicodeStr = new String (bytePair, "ISCII91");
+ if (unicodeStr.charAt(0) != expectCombChars[lookupOffset-1]
+ && unicodeStr.charAt(1) != expectCombChars[lookupOffset]) {
+ throw new Exception("Failed ISCII91 Regression Test");
+ }
+ lookupOffset++;
+ }
+
+ } catch (UnsupportedEncodingException e) {
+ System.err.println ("ISCII91 encoding not supported");
+ throw new Exception ("Failed ISCII91 Regression Test");
+ }
+ }
+
+ public static void main (String[] args) throws Exception {
+ test();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/ISO2022JP.trailEsc Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,454 @@
+test0
+ $B!!(B $B!"(B $B!#(B $B!$(B $B!%(B $B!&(B $B!'(B $B!((B $B!)(B $B!*(B $B!+(B $B!,(B $B!-(B $B!.(B $B!/(B
+$B!0(B $B!1(B $B!2(B $B!3(B $B!4(B $B!5(B $B!6(B $B!7(B $B!8(B $B!9(B $B!:(B $B!;(B $B!<(B $B!=(B $B!>(B $B!?(B
+ $B!A(B $B!B(B $B!C(B $B!D(B $B!E(B $B!F(B $B!G(B $B!H(B $B!I(B $B!J(B $B!K(B $B!L(B $B!M(B $B!N(B $B!O(B
+$B!P(B $B!Q(B $B!R(B $B!S(B $B!T(B $B!U(B $B!V(B $B!W(B $B!X(B $B!Y(B $B!Z(B $B(B $B"*(B $B"+(B $B",(B $B"-(B $B".(B
+ $B":(B $B";(B $B"<(B $B"=(B $B">(B $B"?(B
+$B"@(B $B"A(B $B"J(B $B"K(B $B"L(B $B"M(B $B"N(B $B"O(B
+$B"P(B $B"\(B $B"](B $B"^(B $B"_(B
+$B"`(B $B"a(B $B"b(B $B"c(B $B"d(B $B"e(B $B"f(B $B"g(B $B"h(B $B"i(B $B"j(B
+ $B"r(B $B"s(B $B"t(B $B"u(B $B"v(B $B"w(B $B"x(B $B"y(B $B"~(B
+$B#0(B $B#1(B $B#2(B $B#3(B $B#4(B $B#5(B $B#6(B $B#7(B $B#8(B $B#9(B
+ $B#A(B $B#B(B $B#C(B $B#D(B $B#E(B $B#F(B $B#G(B $B#H(B $B#I(B $B#J(B $B#K(B $B#L(B $B#M(B $B#N(B $B#O(B
+$B#P(B $B#Q(B $B#R(B $B#S(B $B#T(B $B#U(B $B#V(B $B#W(B $B#X(B $B#Y(B $B#Z(B
+ $B#a(B $B#b(B $B#c(B $B#d(B $B#e(B $B#f(B $B#g(B $B#h(B $B#i(B $B#j(B $B#k(B $B#l(B $B#m(B $B#n(B $B#o(B
+$B#p(B $B#q(B $B#r(B $B#s(B $B#t(B $B#u(B $B#v(B $B#w(B $B#x(B $B#y(B $B#z(B
+ $B$!(B $B$"(B $B$#(B $B$$(B $B$%(B $B$&(B $B$'(B $B$((B $B$)(B $B$*(B $B$+(B $B$,(B $B$-(B $B$.(B $B$/(B
+$B$0(B $B$1(B $B$2(B $B$3(B $B$4(B $B$5(B $B$6(B $B$7(B $B$8(B $B$9(B $B$:(B $B$;(B $B$<(B $B$=(B $B$>(B $B$?(B
+$B$@(B $B$A(B $B$B(B $B$C(B $B$D(B $B$E(B $B$F(B $B$G(B $B$H(B $B$I(B $B$J(B $B$K(B $B$L(B $B$M(B $B$N(B $B$O(B
+$B$P(B $B$Q(B $B$R(B $B$S(B $B$T(B $B$U(B $B$V(B $B$W(B $B$X(B $B$Y(B $B$Z(B $B$[(B $B$\(B $B$](B $B$^(B $B$_(B
+$B$`(B $B$a(B $B$b(B $B$c(B $B$d(B $B$e(B $B$f(B $B$g(B $B$h(B $B$i(B $B$j(B $B$k(B $B$l(B $B$m(B $B$n(B $B$o(B
+$B$p(B $B$q(B $B$r(B $B$s(B
+ $B%!(B $B%"(B $B%#(B $B%$(B $B%%(B $B%&(B $B%'(B $B%((B $B%)(B $B%*(B $B%+(B $B%,(B $B%-(B $B%.(B $B%/(B
+$B%0(B $B%1(B $B%2(B $B%3(B $B%4(B $B%5(B $B%6(B $B%7(B $B%8(B $B%9(B $B%:(B $B%;(B $B%<(B $B%=(B $B%>(B $B%?(B
+$B%@(B $B%A(B $B%B(B $B%C(B $B%D(B $B%E(B $B%F(B $B%G(B $B%H(B $B%I(B $B%J(B $B%K(B $B%L(B $B%M(B $B%N(B $B%O(B
+$B%P(B $B%Q(B $B%R(B $B%S(B $B%T(B $B%U(B $B%V(B $B%W(B $B%X(B $B%Y(B $B%Z(B $B%[(B $B%\(B $B%](B $B%^(B $B%_(B
+$B%`(B $B%a(B $B%b(B $B%c(B $B%d(B $B%e(B $B%f(B $B%g(B $B%h(B $B%i(B $B%j(B $B%k(B $B%l(B $B%m(B $B%n(B $B%o(B
+$B%p(B $B%q(B $B%r(B $B%s(B $B%t(B $B%u(B $B%v(B
+ $B&!(B $B&"(B $B&#(B $B&$(B $B&%(B $B&&(B $B&'(B $B&((B $B&)(B $B&*(B $B&+(B $B&,(B $B&-(B $B&.(B $B&/(B
+$B&0(B $B&1(B $B&2(B $B&3(B $B&4(B $B&5(B $B&6(B $B&7(B $B&8(B
+ $B&A(B $B&B(B $B&C(B $B&D(B $B&E(B $B&F(B $B&G(B $B&H(B $B&I(B $B&J(B $B&K(B $B&L(B $B&M(B $B&N(B $B&O(B
+$B&P(B $B&Q(B $B&R(B $B&S(B $B&T(B $B&U(B $B&V(B $B&W(B $B&X(B
+ $B'!(B $B'"(B $B'#(B $B'$(B $B'%(B $B'&(B $B''(B $B'((B $B')(B $B'*(B $B'+(B $B',(B $B'-(B $B'.(B $B'/(B
+$B'0(B $B'1(B $B'2(B $B'3(B $B'4(B $B'5(B $B'6(B $B'7(B $B'8(B $B'9(B $B':(B $B';(B $B'<(B $B'=(B $B'>(B $B'?(B
+$B'@(B $B'A(B
+ $B'Q(B $B'R(B $B'S(B $B'T(B $B'U(B $B'V(B $B'W(B $B'X(B $B'Y(B $B'Z(B $B'[(B $B'\(B $B'](B $B'^(B $B'_(B
+$B'`(B $B'a(B $B'b(B $B'c(B $B'd(B $B'e(B $B'f(B $B'g(B $B'h(B $B'i(B $B'j(B $B'k(B $B'l(B $B'm(B $B'n(B $B'o(B
+$B'p(B $B'q(B
+ $B(!(B $B("(B $B(#(B $B($(B $B(%(B $B(&(B $B('(B $B(((B $B()(B $B(*(B $B(+(B $B(,(B $B(-(B $B(.(B $B(/(B
+$B(0(B $B(1(B $B(2(B $B(3(B $B(4(B $B(5(B $B(6(B $B(7(B $B(8(B $B(9(B $B(:(B $B(;(B $B(<(B $B(=(B $B(>(B $B(?(B
+$B(@(B
+ $B0!(B $B0"(B $B0#(B $B0$(B $B0%(B $B0&(B $B0'(B $B0((B $B0)(B $B0*(B $B0+(B $B0,(B $B0-(B $B0.(B $B0/(B
+$B00(B $B01(B $B02(B $B03(B $B04(B $B05(B $B06(B $B07(B $B08(B $B09(B $B0:(B $B0;(B $B0<(B $B0=(B $B0>(B $B0?(B
+$B0@(B $B0A(B $B0B(B $B0C(B $B0D(B $B0E(B $B0F(B $B0G(B $B0H(B $B0I(B $B0J(B $B0K(B $B0L(B $B0M(B $B0N(B $B0O(B
+$B0P(B $B0Q(B $B0R(B $B0S(B $B0T(B $B0U(B $B0V(B $B0W(B $B0X(B $B0Y(B $B0Z(B $B0[(B $B0\(B $B0](B $B0^(B $B0_(B
+$B0`(B $B0a(B $B0b(B $B0c(B $B0d(B $B0e(B $B0f(B $B0g(B $B0h(B $B0i(B $B0j(B $B0k(B $B0l(B $B0m(B $B0n(B $B0o(B
+$B0p(B $B0q(B $B0r(B $B0s(B $B0t(B $B0u(B $B0v(B $B0w(B $B0x(B $B0y(B $B0z(B $B0{(B $B0|(B $B0}(B $B0~(B
+ $B1!(B $B1"(B $B1#(B $B1$(B $B1%(B $B1&(B $B1'(B $B1((B $B1)(B $B1*(B $B1+(B $B1,(B $B1-(B $B1.(B $B1/(B
+$B10(B $B11(B $B12(B $B13(B $B14(B $B15(B $B16(B $B17(B $B18(B $B19(B $B1:(B $B1;(B $B1<(B $B1=(B $B1>(B $B1?(B
+$B1@(B $B1A(B $B1B(B $B1C(B $B1D(B $B1E(B $B1F(B $B1G(B $B1H(B $B1I(B $B1J(B $B1K(B $B1L(B $B1M(B $B1N(B $B1O(B
+$B1P(B $B1Q(B $B1R(B $B1S(B $B1T(B $B1U(B $B1V(B $B1W(B $B1X(B $B1Y(B $B1Z(B $B1[(B $B1\(B $B1](B $B1^(B $B1_(B
+$B1`(B $B1a(B $B1b(B $B1c(B $B1d(B $B1e(B $B1f(B $B1g(B $B1h(B $B1i(B $B1j(B $B1k(B $B1l(B $B1m(B $B1n(B $B1o(B
+$B1p(B $B1q(B $B1r(B $B1s(B $B1t(B $B1u(B $B1v(B $B1w(B $B1x(B $B1y(B $B1z(B $B1{(B $B1|(B $B1}(B $B1~(B
+ $B2!(B $B2"(B $B2#(B $B2$(B $B2%(B $B2&(B $B2'(B $B2((B $B2)(B $B2*(B $B2+(B $B2,(B $B2-(B $B2.(B $B2/(B
+$B20(B $B21(B $B22(B $B23(B $B24(B $B25(B $B26(B $B27(B $B28(B $B29(B $B2:(B $B2;(B $B2<(B $B2=(B $B2>(B $B2?(B
+$B2@(B $B2A(B $B2B(B $B2C(B $B2D(B $B2E(B $B2F(B $B2G(B $B2H(B $B2I(B $B2J(B $B2K(B $B2L(B $B2M(B $B2N(B $B2O(B
+$B2P(B $B2Q(B $B2R(B $B2S(B $B2T(B $B2U(B $B2V(B $B2W(B $B2X(B $B2Y(B $B2Z(B $B2[(B $B2\(B $B2](B $B2^(B $B2_(B
+$B2`(B $B2a(B $B2b(B $B2c(B $B2d(B $B2e(B $B2f(B $B2g(B $B2h(B $B2i(B $B2j(B $B2k(B $B2l(B $B2m(B $B2n(B $B2o(B
+$B2p(B $B2q(B $B2r(B $B2s(B $B2t(B $B2u(B $B2v(B $B2w(B $B2x(B $B2y(B $B2z(B $B2{(B $B2|(B $B2}(B $B2~(B
+ $B3!(B $B3"(B $B3#(B $B3$(B $B3%(B $B3&(B $B3'(B $B3((B $B3)(B $B3*(B $B3+(B $B3,(B $B3-(B $B3.(B $B3/(B
+$B30(B $B31(B $B32(B $B33(B $B34(B $B35(B $B36(B $B37(B $B38(B $B39(B $B3:(B $B3;(B $B3<(B $B3=(B $B3>(B $B3?(B
+$B3@(B $B3A(B $B3B(B $B3C(B $B3D(B $B3E(B $B3F(B $B3G(B $B3H(B $B3I(B $B3J(B $B3K(B $B3L(B $B3M(B $B3N(B $B3O(B
+$B3P(B $B3Q(B $B3R(B $B3S(B $B3T(B $B3U(B $B3V(B $B3W(B $B3X(B $B3Y(B $B3Z(B $B3[(B $B3\(B $B3](B $B3^(B $B3_(B
+$B3`(B $B3a(B $B3b(B $B3c(B $B3d(B $B3e(B $B3f(B $B3g(B $B3h(B $B3i(B $B3j(B $B3k(B $B3l(B $B3m(B $B3n(B $B3o(B
+$B3p(B $B3q(B $B3r(B $B3s(B $B3t(B $B3u(B $B3v(B $B3w(B $B3x(B $B3y(B $B3z(B $B3{(B $B3|(B $B3}(B $B3~(B
+ $B4!(B $B4"(B $B4#(B $B4$(B $B4%(B $B4&(B $B4'(B $B4((B $B4)(B $B4*(B $B4+(B $B4,(B $B4-(B $B4.(B $B4/(B
+$B40(B $B41(B $B42(B $B43(B $B44(B $B45(B $B46(B $B47(B $B48(B $B49(B $B4:(B $B4;(B $B4<(B $B4=(B $B4>(B $B4?(B
+$B4@(B $B4A(B $B4B(B $B4C(B $B4D(B $B4E(B $B4F(B $B4G(B $B4H(B $B4I(B $B4J(B $B4K(B $B4L(B $B4M(B $B4N(B $B4O(B
+$B4P(B $B4Q(B $B4R(B $B4S(B $B4T(B $B4U(B $B4V(B $B4W(B $B4X(B $B4Y(B $B4Z(B $B4[(B $B4\(B $B4](B $B4^(B $B4_(B
+$B4`(B $B4a(B $B4b(B $B4c(B $B4d(B $B4e(B $B4f(B $B4g(B $B4h(B $B4i(B $B4j(B $B4k(B $B4l(B $B4m(B $B4n(B $B4o(B
+$B4p(B $B4q(B $B4r(B $B4s(B $B4t(B $B4u(B $B4v(B $B4w(B $B4x(B $B4y(B $B4z(B $B4{(B $B4|(B $B4}(B $B4~(B
+ $B5!(B $B5"(B $B5#(B $B5$(B $B5%(B $B5&(B $B5'(B $B5((B $B5)(B $B5*(B $B5+(B $B5,(B $B5-(B $B5.(B $B5/(B
+$B50(B $B51(B $B52(B $B53(B $B54(B $B55(B $B56(B $B57(B $B58(B $B59(B $B5:(B $B5;(B $B5<(B $B5=(B $B5>(B $B5?(B
+$B5@(B $B5A(B $B5B(B $B5C(B $B5D(B $B5E(B $B5F(B $B5G(B $B5H(B $B5I(B $B5J(B $B5K(B $B5L(B $B5M(B $B5N(B $B5O(B
+$B5P(B $B5Q(B $B5R(B $B5S(B $B5T(B $B5U(B $B5V(B $B5W(B $B5X(B $B5Y(B $B5Z(B $B5[(B $B5\(B $B5](B $B5^(B $B5_(B
+$B5`(B $B5a(B $B5b(B $B5c(B $B5d(B $B5e(B $B5f(B $B5g(B $B5h(B $B5i(B $B5j(B $B5k(B $B5l(B $B5m(B $B5n(B $B5o(B
+$B5p(B $B5q(B $B5r(B $B5s(B $B5t(B $B5u(B $B5v(B $B5w(B $B5x(B $B5y(B $B5z(B $B5{(B $B5|(B $B5}(B $B5~(B
+ $B6!(B $B6"(B $B6#(B $B6$(B $B6%(B $B6&(B $B6'(B $B6((B $B6)(B $B6*(B $B6+(B $B6,(B $B6-(B $B6.(B $B6/(B
+$B60(B $B61(B $B62(B $B63(B $B64(B $B65(B $B66(B $B67(B $B68(B $B69(B $B6:(B $B6;(B $B6<(B $B6=(B $B6>(B $B6?(B
+$B6@(B $B6A(B $B6B(B $B6C(B $B6D(B $B6E(B $B6F(B $B6G(B $B6H(B $B6I(B $B6J(B $B6K(B $B6L(B $B6M(B $B6N(B $B6O(B
+$B6P(B $B6Q(B $B6R(B $B6S(B $B6T(B $B6U(B $B6V(B $B6W(B $B6X(B $B6Y(B $B6Z(B $B6[(B $B6\(B $B6](B $B6^(B $B6_(B
+$B6`(B $B6a(B $B6b(B $B6c(B $B6d(B $B6e(B $B6f(B $B6g(B $B6h(B $B6i(B $B6j(B $B6k(B $B6l(B $B6m(B $B6n(B $B6o(B
+$B6p(B $B6q(B $B6r(B $B6s(B $B6t(B $B6u(B $B6v(B $B6w(B $B6x(B $B6y(B $B6z(B $B6{(B $B6|(B $B6}(B $B6~(B
+ $B7!(B $B7"(B $B7#(B $B7$(B $B7%(B $B7&(B $B7'(B $B7((B $B7)(B $B7*(B $B7+(B $B7,(B $B7-(B $B7.(B $B7/(B
+$B70(B $B71(B $B72(B $B73(B $B74(B $B75(B $B76(B $B77(B $B78(B $B79(B $B7:(B $B7;(B $B7<(B $B7=(B $B7>(B $B7?(B
+$B7@(B $B7A(B $B7B(B $B7C(B $B7D(B $B7E(B $B7F(B $B7G(B $B7H(B $B7I(B $B7J(B $B7K(B $B7L(B $B7M(B $B7N(B $B7O(B
+$B7P(B $B7Q(B $B7R(B $B7S(B $B7T(B $B7U(B $B7V(B $B7W(B $B7X(B $B7Y(B $B7Z(B $B7[(B $B7\(B $B7](B $B7^(B $B7_(B
+$B7`(B $B7a(B $B7b(B $B7c(B $B7d(B $B7e(B $B7f(B $B7g(B $B7h(B $B7i(B $B7j(B $B7k(B $B7l(B $B7m(B $B7n(B $B7o(B
+$B7p(B $B7q(B $B7r(B $B7s(B $B7t(B $B7u(B $B7v(B $B7w(B $B7x(B $B7y(B $B7z(B $B7{(B $B7|(B $B7}(B $B7~(B
+ $B8!(B $B8"(B $B8#(B $B8$(B $B8%(B $B8&(B $B8'(B $B8((B $B8)(B $B8*(B $B8+(B $B8,(B $B8-(B $B8.(B $B8/(B
+$B80(B $B81(B $B82(B $B83(B $B84(B $B85(B $B86(B $B87(B $B88(B $B89(B $B8:(B $B8;(B $B8<(B $B8=(B $B8>(B $B8?(B
+$B8@(B $B8A(B $B8B(B $B8C(B $B8D(B $B8E(B $B8F(B $B8G(B $B8H(B $B8I(B $B8J(B $B8K(B $B8L(B $B8M(B $B8N(B $B8O(B
+$B8P(B $B8Q(B $B8R(B $B8S(B $B8T(B $B8U(B $B8V(B $B8W(B $B8X(B $B8Y(B $B8Z(B $B8[(B $B8\(B $B8](B $B8^(B $B8_(B
+$B8`(B $B8a(B $B8b(B $B8c(B $B8d(B $B8e(B $B8f(B $B8g(B $B8h(B $B8i(B $B8j(B $B8k(B $B8l(B $B8m(B $B8n(B $B8o(B
+$B8p(B $B8q(B $B8r(B $B8s(B $B8t(B $B8u(B $B8v(B $B8w(B $B8x(B $B8y(B $B8z(B $B8{(B $B8|(B $B8}(B $B8~(B
+ $B9!(B $B9"(B $B9#(B $B9$(B $B9%(B $B9&(B $B9'(B $B9((B $B9)(B $B9*(B $B9+(B $B9,(B $B9-(B $B9.(B $B9/(B
+$B90(B $B91(B $B92(B $B93(B $B94(B $B95(B $B96(B $B97(B $B98(B $B99(B $B9:(B $B9;(B $B9<(B $B9=(B $B9>(B $B9?(B
+$B9@(B $B9A(B $B9B(B $B9C(B $B9D(B $B9E(B $B9F(B $B9G(B $B9H(B $B9I(B $B9J(B $B9K(B $B9L(B $B9M(B $B9N(B $B9O(B
+$B9P(B $B9Q(B $B9R(B $B9S(B $B9T(B $B9U(B $B9V(B $B9W(B $B9X(B $B9Y(B $B9Z(B $B9[(B $B9\(B $B9](B $B9^(B $B9_(B
+$B9`(B $B9a(B $B9b(B $B9c(B $B9d(B $B9e(B $B9f(B $B9g(B $B9h(B $B9i(B $B9j(B $B9k(B $B9l(B $B9m(B $B9n(B $B9o(B
+$B9p(B $B9q(B $B9r(B $B9s(B $B9t(B $B9u(B $B9v(B $B9w(B $B9x(B $B9y(B $B9z(B $B9{(B $B9|(B $B9}(B $B9~(B
+ $B:!(B $B:"(B $B:#(B $B:$(B $B:%(B $B:&(B $B:'(B $B:((B $B:)(B $B:*(B $B:+(B $B:,(B $B:-(B $B:.(B $B:/(B
+$B:0(B $B:1(B $B:2(B $B:3(B $B:4(B $B:5(B $B:6(B $B:7(B $B:8(B $B:9(B $B::(B $B:;(B $B:<(B $B:=(B $B:>(B $B:?(B
+$B:@(B $B:A(B $B:B(B $B:C(B $B:D(B $B:E(B $B:F(B $B:G(B $B:H(B $B:I(B $B:J(B $B:K(B $B:L(B $B:M(B $B:N(B $B:O(B
+$B:P(B $B:Q(B $B:R(B $B:S(B $B:T(B $B:U(B $B:V(B $B:W(B $B:X(B $B:Y(B $B:Z(B $B:[(B $B:\(B $B:](B $B:^(B $B:_(B
+$B:`(B $B:a(B $B:b(B $B:c(B $B:d(B $B:e(B $B:f(B $B:g(B $B:h(B $B:i(B $B:j(B $B:k(B $B:l(B $B:m(B $B:n(B $B:o(B
+$B:p(B $B:q(B $B:r(B $B:s(B $B:t(B $B:u(B $B:v(B $B:w(B $B:x(B $B:y(B $B:z(B $B:{(B $B:|(B $B:}(B $B:~(B
+ $B;!(B $B;"(B $B;#(B $B;$(B $B;%(B $B;&(B $B;'(B $B;((B $B;)(B $B;*(B $B;+(B $B;,(B $B;-(B $B;.(B $B;/(B
+$B;0(B $B;1(B $B;2(B $B;3(B $B;4(B $B;5(B $B;6(B $B;7(B $B;8(B $B;9(B $B;:(B $B;;(B $B;<(B $B;=(B $B;>(B $B;?(B
+$B;@(B $B;A(B $B;B(B $B;C(B $B;D(B $B;E(B $B;F(B $B;G(B $B;H(B $B;I(B $B;J(B $B;K(B $B;L(B $B;M(B $B;N(B $B;O(B
+$B;P(B $B;Q(B $B;R(B $B;S(B $B;T(B $B;U(B $B;V(B $B;W(B $B;X(B $B;Y(B $B;Z(B $B;[(B $B;\(B $B;](B $B;^(B $B;_(B
+$B;`(B $B;a(B $B;b(B $B;c(B $B;d(B $B;e(B $B;f(B $B;g(B $B;h(B $B;i(B $B;j(B $B;k(B $B;l(B $B;m(B $B;n(B $B;o(B
+$B;p(B $B;q(B $B;r(B $B;s(B $B;t(B $B;u(B $B;v(B $B;w(B $B;x(B $B;y(B $B;z(B $B;{(B $B;|(B $B;}(B $B;~(B
+ $B<!(B $B<"(B $B<#(B $B<$(B $B<%(B $B<&(B $B<'(B $B<((B $B<)(B $B<*(B $B<+(B $B<,(B $B<-(B $B<.(B $B</(B
+$B<0(B $B<1(B $B<2(B $B<3(B $B<4(B $B<5(B $B<6(B $B<7(B $B<8(B $B<9(B $B<:(B $B<;(B $B<<(B $B<=(B $B<>(B $B<?(B
+$B<@(B $B<A(B $B<B(B $B<C(B $B<D(B $B<E(B $B<F(B $B<G(B $B<H(B $B<I(B $B<J(B $B<K(B $B<L(B $B<M(B $B<N(B $B<O(B
+$B<P(B $B<Q(B $B<R(B $B<S(B $B<T(B $B<U(B $B<V(B $B<W(B $B<X(B $B<Y(B $B<Z(B $B<[(B $B<\(B $B<](B $B<^(B $B<_(B
+$B<`(B $B<a(B $B<b(B $B<c(B $B<d(B $B<e(B $B<f(B $B<g(B $B<h(B $B<i(B $B<j(B $B<k(B $B<l(B $B<m(B $B<n(B $B<o(B
+$B<p(B $B<q(B $B<r(B $B<s(B $B<t(B $B<u(B $B<v(B $B<w(B $B<x(B $B<y(B $B<z(B $B<{(B $B<|(B $B<}(B $B<~(B
+ $B=!(B $B="(B $B=#(B $B=$(B $B=%(B $B=&(B $B='(B $B=((B $B=)(B $B=*(B $B=+(B $B=,(B $B=-(B $B=.(B $B=/(B
+$B=0(B $B=1(B $B=2(B $B=3(B $B=4(B $B=5(B $B=6(B $B=7(B $B=8(B $B=9(B $B=:(B $B=;(B $B=<(B $B==(B $B=>(B $B=?(B
+$B=@(B $B=A(B $B=B(B $B=C(B $B=D(B $B=E(B $B=F(B $B=G(B $B=H(B $B=I(B $B=J(B $B=K(B $B=L(B $B=M(B $B=N(B $B=O(B
+$B=P(B $B=Q(B $B=R(B $B=S(B $B=T(B $B=U(B $B=V(B $B=W(B $B=X(B $B=Y(B $B=Z(B $B=[(B $B=\(B $B=](B $B=^(B $B=_(B
+$B=`(B $B=a(B $B=b(B $B=c(B $B=d(B $B=e(B $B=f(B $B=g(B $B=h(B $B=i(B $B=j(B $B=k(B $B=l(B $B=m(B $B=n(B $B=o(B
+$B=p(B $B=q(B $B=r(B $B=s(B $B=t(B $B=u(B $B=v(B $B=w(B $B=x(B $B=y(B $B=z(B $B={(B $B=|(B $B=}(B $B=~(B
+ $B>!(B $B>"(B $B>#(B $B>$(B $B>%(B $B>&(B $B>'(B $B>((B $B>)(B $B>*(B $B>+(B $B>,(B $B>-(B $B>.(B $B>/(B
+$B>0(B $B>1(B $B>2(B $B>3(B $B>4(B $B>5(B $B>6(B $B>7(B $B>8(B $B>9(B $B>:(B $B>;(B $B><(B $B>=(B $B>>(B $B>?(B
+$B>@(B $B>A(B $B>B(B $B>C(B $B>D(B $B>E(B $B>F(B $B>G(B $B>H(B $B>I(B $B>J(B $B>K(B $B>L(B $B>M(B $B>N(B $B>O(B
+$B>P(B $B>Q(B $B>R(B $B>S(B $B>T(B $B>U(B $B>V(B $B>W(B $B>X(B $B>Y(B $B>Z(B $B>[(B $B>\(B $B>](B $B>^(B $B>_(B
+$B>`(B $B>a(B $B>b(B $B>c(B $B>d(B $B>e(B $B>f(B $B>g(B $B>h(B $B>i(B $B>j(B $B>k(B $B>l(B $B>m(B $B>n(B $B>o(B
+$B>p(B $B>q(B $B>r(B $B>s(B $B>t(B $B>u(B $B>v(B $B>w(B $B>x(B $B>y(B $B>z(B $B>{(B $B>|(B $B>}(B $B>~(B
+ $B?!(B $B?"(B $B?#(B $B?$(B $B?%(B $B?&(B $B?'(B $B?((B $B?)(B $B?*(B $B?+(B $B?,(B $B?-(B $B?.(B $B?/(B
+$B?0(B $B?1(B $B?2(B $B?3(B $B?4(B $B?5(B $B?6(B $B?7(B $B?8(B $B?9(B $B?:(B $B?;(B $B?<(B $B?=(B $B?>(B $B??(B
+$B?@(B $B?A(B $B?B(B $B?C(B $B?D(B $B?E(B $B?F(B $B?G(B $B?H(B $B?I(B $B?J(B $B?K(B $B?L(B $B?M(B $B?N(B $B?O(B
+$B?P(B $B?Q(B $B?R(B $B?S(B $B?T(B $B?U(B $B?V(B $B?W(B $B?X(B $B?Y(B $B?Z(B $B?[(B $B?\(B $B?](B $B?^(B $B?_(B
+$B?`(B $B?a(B $B?b(B $B?c(B $B?d(B $B?e(B $B?f(B $B?g(B $B?h(B $B?i(B $B?j(B $B?k(B $B?l(B $B?m(B $B?n(B $B?o(B
+$B?p(B $B?q(B $B?r(B $B?s(B $B?t(B $B?u(B $B?v(B $B?w(B $B?x(B $B?y(B $B?z(B $B?{(B $B?|(B $B?}(B $B?~(B
+ $B@!(B $B@"(B $B@#(B $B@$(B $B@%(B $B@&(B $B@'(B $B@((B $B@)(B $B@*(B $B@+(B $B@,(B $B@-(B $B@.(B $B@/(B
+$B@0(B $B@1(B $B@2(B $B@3(B $B@4(B $B@5(B $B@6(B $B@7(B $B@8(B $B@9(B $B@:(B $B@;(B $B@<(B $B@=(B $B@>(B $B@?(B
+$B@@(B $B@A(B $B@B(B $B@C(B $B@D(B $B@E(B $B@F(B $B@G(B $B@H(B $B@I(B $B@J(B $B@K(B $B@L(B $B@M(B $B@N(B $B@O(B
+$B@P(B $B@Q(B $B@R(B $B@S(B $B@T(B $B@U(B $B@V(B $B@W(B $B@X(B $B@Y(B $B@Z(B $B@[(B $B@\(B $B@](B $B@^(B $B@_(B
+$B@`(B $B@a(B $B@b(B $B@c(B $B@d(B $B@e(B $B@f(B $B@g(B $B@h(B $B@i(B $B@j(B $B@k(B $B@l(B $B@m(B $B@n(B $B@o(B
+$B@p(B $B@q(B $B@r(B $B@s(B $B@t(B $B@u(B $B@v(B $B@w(B $B@x(B $B@y(B $B@z(B $B@{(B $B@|(B $B@}(B $B@~(B
+ $BA!(B $BA"(B $BA#(B $BA$(B $BA%(B $BA&(B $BA'(B $BA((B $BA)(B $BA*(B $BA+(B $BA,(B $BA-(B $BA.(B $BA/(B
+$BA0(B $BA1(B $BA2(B $BA3(B $BA4(B $BA5(B $BA6(B $BA7(B $BA8(B $BA9(B $BA:(B $BA;(B $BA<(B $BA=(B $BA>(B $BA?(B
+$BA@(B $BAA(B $BAB(B $BAC(B $BAD(B $BAE(B $BAF(B $BAG(B $BAH(B $BAI(B $BAJ(B $BAK(B $BAL(B $BAM(B $BAN(B $BAO(B
+$BAP(B $BAQ(B $BAR(B $BAS(B $BAT(B $BAU(B $BAV(B $BAW(B $BAX(B $BAY(B $BAZ(B $BA[(B $BA\(B $BA](B $BA^(B $BA_(B
+$BA`(B $BAa(B $BAb(B $BAc(B $BAd(B $BAe(B $BAf(B $BAg(B $BAh(B $BAi(B $BAj(B $BAk(B $BAl(B $BAm(B $BAn(B $BAo(B
+$BAp(B $BAq(B $BAr(B $BAs(B $BAt(B $BAu(B $BAv(B $BAw(B $BAx(B $BAy(B $BAz(B $BA{(B $BA|(B $BA}(B $BA~(B
+ $BB!(B $BB"(B $BB#(B $BB$(B $BB%(B $BB&(B $BB'(B $BB((B $BB)(B $BB*(B $BB+(B $BB,(B $BB-(B $BB.(B $BB/(B
+$BB0(B $BB1(B $BB2(B $BB3(B $BB4(B $BB5(B $BB6(B $BB7(B $BB8(B $BB9(B $BB:(B $BB;(B $BB<(B $BB=(B $BB>(B $BB?(B
+$BB@(B $BBA(B $BBB(B $BBC(B $BBD(B $BBE(B $BBF(B $BBG(B $BBH(B $BBI(B $BBJ(B $BBK(B $BBL(B $BBM(B $BBN(B $BBO(B
+$BBP(B $BBQ(B $BBR(B $BBS(B $BBT(B $BBU(B $BBV(B $BBW(B $BBX(B $BBY(B $BBZ(B $BB[(B $BB\(B $BB](B $BB^(B $BB_(B
+$BB`(B $BBa(B $BBb(B $BBc(B $BBd(B $BBe(B $BBf(B $BBg(B $BBh(B $BBi(B $BBj(B $BBk(B $BBl(B $BBm(B $BBn(B $BBo(B
+$BBp(B $BBq(B $BBr(B $BBs(B $BBt(B $BBu(B $BBv(B $BBw(B $BBx(B $BBy(B $BBz(B $BB{(B $BB|(B $BB}(B $BB~(B
+ $BC!(B $BC"(B $BC#(B $BC$(B $BC%(B $BC&(B $BC'(B $BC((B $BC)(B $BC*(B $BC+(B $BC,(B $BC-(B $BC.(B $BC/(B
+$BC0(B $BC1(B $BC2(B $BC3(B $BC4(B $BC5(B $BC6(B $BC7(B $BC8(B $BC9(B $BC:(B $BC;(B $BC<(B $BC=(B $BC>(B $BC?(B
+$BC@(B $BCA(B $BCB(B $BCC(B $BCD(B $BCE(B $BCF(B $BCG(B $BCH(B $BCI(B $BCJ(B $BCK(B $BCL(B $BCM(B $BCN(B $BCO(B
+$BCP(B $BCQ(B $BCR(B $BCS(B $BCT(B $BCU(B $BCV(B $BCW(B $BCX(B $BCY(B $BCZ(B $BC[(B $BC\(B $BC](B $BC^(B $BC_(B
+$BC`(B $BCa(B $BCb(B $BCc(B $BCd(B $BCe(B $BCf(B $BCg(B $BCh(B $BCi(B $BCj(B $BCk(B $BCl(B $BCm(B $BCn(B $BCo(B
+$BCp(B $BCq(B $BCr(B $BCs(B $BCt(B $BCu(B $BCv(B $BCw(B $BCx(B $BCy(B $BCz(B $BC{(B $BC|(B $BC}(B $BC~(B
+ $BD!(B $BD"(B $BD#(B $BD$(B $BD%(B $BD&(B $BD'(B $BD((B $BD)(B $BD*(B $BD+(B $BD,(B $BD-(B $BD.(B $BD/(B
+$BD0(B $BD1(B $BD2(B $BD3(B $BD4(B $BD5(B $BD6(B $BD7(B $BD8(B $BD9(B $BD:(B $BD;(B $BD<(B $BD=(B $BD>(B $BD?(B
+$BD@(B $BDA(B $BDB(B $BDC(B $BDD(B $BDE(B $BDF(B $BDG(B $BDH(B $BDI(B $BDJ(B $BDK(B $BDL(B $BDM(B $BDN(B $BDO(B
+$BDP(B $BDQ(B $BDR(B $BDS(B $BDT(B $BDU(B $BDV(B $BDW(B $BDX(B $BDY(B $BDZ(B $BD[(B $BD\(B $BD](B $BD^(B $BD_(B
+$BD`(B $BDa(B $BDb(B $BDc(B $BDd(B $BDe(B $BDf(B $BDg(B $BDh(B $BDi(B $BDj(B $BDk(B $BDl(B $BDm(B $BDn(B $BDo(B
+$BDp(B $BDq(B $BDr(B $BDs(B $BDt(B $BDu(B $BDv(B $BDw(B $BDx(B $BDy(B $BDz(B $BD{(B $BD|(B $BD}(B $BD~(B
+ $BE!(B $BE"(B $BE#(B $BE$(B $BE%(B $BE&(B $BE'(B $BE((B $BE)(B $BE*(B $BE+(B $BE,(B $BE-(B $BE.(B $BE/(B
+$BE0(B $BE1(B $BE2(B $BE3(B $BE4(B $BE5(B $BE6(B $BE7(B $BE8(B $BE9(B $BE:(B $BE;(B $BE<(B $BE=(B $BE>(B $BE?(B
+$BE@(B $BEA(B $BEB(B $BEC(B $BED(B $BEE(B $BEF(B $BEG(B $BEH(B $BEI(B $BEJ(B $BEK(B $BEL(B $BEM(B $BEN(B $BEO(B
+$BEP(B $BEQ(B $BER(B $BES(B $BET(B $BEU(B $BEV(B $BEW(B $BEX(B $BEY(B $BEZ(B $BE[(B $BE\(B $BE](B $BE^(B $BE_(B
+$BE`(B $BEa(B $BEb(B $BEc(B $BEd(B $BEe(B $BEf(B $BEg(B $BEh(B $BEi(B $BEj(B $BEk(B $BEl(B $BEm(B $BEn(B $BEo(B
+$BEp(B $BEq(B $BEr(B $BEs(B $BEt(B $BEu(B $BEv(B $BEw(B $BEx(B $BEy(B $BEz(B $BE{(B $BE|(B $BE}(B $BE~(B
+ $BF!(B $BF"(B $BF#(B $BF$(B $BF%(B $BF&(B $BF'(B $BF((B $BF)(B $BF*(B $BF+(B $BF,(B $BF-(B $BF.(B $BF/(B
+$BF0(B $BF1(B $BF2(B $BF3(B $BF4(B $BF5(B $BF6(B $BF7(B $BF8(B $BF9(B $BF:(B $BF;(B $BF<(B $BF=(B $BF>(B $BF?(B
+$BF@(B $BFA(B $BFB(B $BFC(B $BFD(B $BFE(B $BFF(B $BFG(B $BFH(B $BFI(B $BFJ(B $BFK(B $BFL(B $BFM(B $BFN(B $BFO(B
+$BFP(B $BFQ(B $BFR(B $BFS(B $BFT(B $BFU(B $BFV(B $BFW(B $BFX(B $BFY(B $BFZ(B $BF[(B $BF\(B $BF](B $BF^(B $BF_(B
+$BF`(B $BFa(B $BFb(B $BFc(B $BFd(B $BFe(B $BFf(B $BFg(B $BFh(B $BFi(B $BFj(B $BFk(B $BFl(B $BFm(B $BFn(B $BFo(B
+$BFp(B $BFq(B $BFr(B $BFs(B $BFt(B $BFu(B $BFv(B $BFw(B $BFx(B $BFy(B $BFz(B $BF{(B $BF|(B $BF}(B $BF~(B
+ $BG!(B $BG"(B $BG#(B $BG$(B $BG%(B $BG&(B $BG'(B $BG((B $BG)(B $BG*(B $BG+(B $BG,(B $BG-(B $BG.(B $BG/(B
+$BG0(B $BG1(B $BG2(B $BG3(B $BG4(B $BG5(B $BG6(B $BG7(B $BG8(B $BG9(B $BG:(B $BG;(B $BG<(B $BG=(B $BG>(B $BG?(B
+$BG@(B $BGA(B $BGB(B $BGC(B $BGD(B $BGE(B $BGF(B $BGG(B $BGH(B $BGI(B $BGJ(B $BGK(B $BGL(B $BGM(B $BGN(B $BGO(B
+$BGP(B $BGQ(B $BGR(B $BGS(B $BGT(B $BGU(B $BGV(B $BGW(B $BGX(B $BGY(B $BGZ(B $BG[(B $BG\(B $BG](B $BG^(B $BG_(B
+$BG`(B $BGa(B $BGb(B $BGc(B $BGd(B $BGe(B $BGf(B $BGg(B $BGh(B $BGi(B $BGj(B $BGk(B $BGl(B $BGm(B $BGn(B $BGo(B
+$BGp(B $BGq(B $BGr(B $BGs(B $BGt(B $BGu(B $BGv(B $BGw(B $BGx(B $BGy(B $BGz(B $BG{(B $BG|(B $BG}(B $BG~(B
+ $BH!(B $BH"(B $BH#(B $BH$(B $BH%(B $BH&(B $BH'(B $BH((B $BH)(B $BH*(B $BH+(B $BH,(B $BH-(B $BH.(B $BH/(B
+$BH0(B $BH1(B $BH2(B $BH3(B $BH4(B $BH5(B $BH6(B $BH7(B $BH8(B $BH9(B $BH:(B $BH;(B $BH<(B $BH=(B $BH>(B $BH?(B
+$BH@(B $BHA(B $BHB(B $BHC(B $BHD(B $BHE(B $BHF(B $BHG(B $BHH(B $BHI(B $BHJ(B $BHK(B $BHL(B $BHM(B $BHN(B $BHO(B
+$BHP(B $BHQ(B $BHR(B $BHS(B $BHT(B $BHU(B $BHV(B $BHW(B $BHX(B $BHY(B $BHZ(B $BH[(B $BH\(B $BH](B $BH^(B $BH_(B
+$BH`(B $BHa(B $BHb(B $BHc(B $BHd(B $BHe(B $BHf(B $BHg(B $BHh(B $BHi(B $BHj(B $BHk(B $BHl(B $BHm(B $BHn(B $BHo(B
+$BHp(B $BHq(B $BHr(B $BHs(B $BHt(B $BHu(B $BHv(B $BHw(B $BHx(B $BHy(B $BHz(B $BH{(B $BH|(B $BH}(B $BH~(B
+ $BI!(B $BI"(B $BI#(B $BI$(B $BI%(B $BI&(B $BI'(B $BI((B $BI)(B $BI*(B $BI+(B $BI,(B $BI-(B $BI.(B $BI/(B
+$BI0(B $BI1(B $BI2(B $BI3(B $BI4(B $BI5(B $BI6(B $BI7(B $BI8(B $BI9(B $BI:(B $BI;(B $BI<(B $BI=(B $BI>(B $BI?(B
+$BI@(B $BIA(B $BIB(B $BIC(B $BID(B $BIE(B $BIF(B $BIG(B $BIH(B $BII(B $BIJ(B $BIK(B $BIL(B $BIM(B $BIN(B $BIO(B
+$BIP(B $BIQ(B $BIR(B $BIS(B $BIT(B $BIU(B $BIV(B $BIW(B $BIX(B $BIY(B $BIZ(B $BI[(B $BI\(B $BI](B $BI^(B $BI_(B
+$BI`(B $BIa(B $BIb(B $BIc(B $BId(B $BIe(B $BIf(B $BIg(B $BIh(B $BIi(B $BIj(B $BIk(B $BIl(B $BIm(B $BIn(B $BIo(B
+$BIp(B $BIq(B $BIr(B $BIs(B $BIt(B $BIu(B $BIv(B $BIw(B $BIx(B $BIy(B $BIz(B $BI{(B $BI|(B $BI}(B $BI~(B
+ $BJ!(B $BJ"(B $BJ#(B $BJ$(B $BJ%(B $BJ&(B $BJ'(B $BJ((B $BJ)(B $BJ*(B $BJ+(B $BJ,(B $BJ-(B $BJ.(B $BJ/(B
+$BJ0(B $BJ1(B $BJ2(B $BJ3(B $BJ4(B $BJ5(B $BJ6(B $BJ7(B $BJ8(B $BJ9(B $BJ:(B $BJ;(B $BJ<(B $BJ=(B $BJ>(B $BJ?(B
+$BJ@(B $BJA(B $BJB(B $BJC(B $BJD(B $BJE(B $BJF(B $BJG(B $BJH(B $BJI(B $BJJ(B $BJK(B $BJL(B $BJM(B $BJN(B $BJO(B
+$BJP(B $BJQ(B $BJR(B $BJS(B $BJT(B $BJU(B $BJV(B $BJW(B $BJX(B $BJY(B $BJZ(B $BJ[(B $BJ\(B $BJ](B $BJ^(B $BJ_(B
+$BJ`(B $BJa(B $BJb(B $BJc(B $BJd(B $BJe(B $BJf(B $BJg(B $BJh(B $BJi(B $BJj(B $BJk(B $BJl(B $BJm(B $BJn(B $BJo(B
+$BJp(B $BJq(B $BJr(B $BJs(B $BJt(B $BJu(B $BJv(B $BJw(B $BJx(B $BJy(B $BJz(B $BJ{(B $BJ|(B $BJ}(B $BJ~(B
+ $BK!(B $BK"(B $BK#(B $BK$(B $BK%(B $BK&(B $BK'(B $BK((B $BK)(B $BK*(B $BK+(B $BK,(B $BK-(B $BK.(B $BK/(B
+$BK0(B $BK1(B $BK2(B $BK3(B $BK4(B $BK5(B $BK6(B $BK7(B $BK8(B $BK9(B $BK:(B $BK;(B $BK<(B $BK=(B $BK>(B $BK?(B
+$BK@(B $BKA(B $BKB(B $BKC(B $BKD(B $BKE(B $BKF(B $BKG(B $BKH(B $BKI(B $BKJ(B $BKK(B $BKL(B $BKM(B $BKN(B $BKO(B
+$BKP(B $BKQ(B $BKR(B $BKS(B $BKT(B $BKU(B $BKV(B $BKW(B $BKX(B $BKY(B $BKZ(B $BK[(B $BK\(B $BK](B $BK^(B $BK_(B
+$BK`(B $BKa(B $BKb(B $BKc(B $BKd(B $BKe(B $BKf(B $BKg(B $BKh(B $BKi(B $BKj(B $BKk(B $BKl(B $BKm(B $BKn(B $BKo(B
+$BKp(B $BKq(B $BKr(B $BKs(B $BKt(B $BKu(B $BKv(B $BKw(B $BKx(B $BKy(B $BKz(B $BK{(B $BK|(B $BK}(B $BK~(B
+ $BL!(B $BL"(B $BL#(B $BL$(B $BL%(B $BL&(B $BL'(B $BL((B $BL)(B $BL*(B $BL+(B $BL,(B $BL-(B $BL.(B $BL/(B
+$BL0(B $BL1(B $BL2(B $BL3(B $BL4(B $BL5(B $BL6(B $BL7(B $BL8(B $BL9(B $BL:(B $BL;(B $BL<(B $BL=(B $BL>(B $BL?(B
+$BL@(B $BLA(B $BLB(B $BLC(B $BLD(B $BLE(B $BLF(B $BLG(B $BLH(B $BLI(B $BLJ(B $BLK(B $BLL(B $BLM(B $BLN(B $BLO(B
+$BLP(B $BLQ(B $BLR(B $BLS(B $BLT(B $BLU(B $BLV(B $BLW(B $BLX(B $BLY(B $BLZ(B $BL[(B $BL\(B $BL](B $BL^(B $BL_(B
+$BL`(B $BLa(B $BLb(B $BLc(B $BLd(B $BLe(B $BLf(B $BLg(B $BLh(B $BLi(B $BLj(B $BLk(B $BLl(B $BLm(B $BLn(B $BLo(B
+$BLp(B $BLq(B $BLr(B $BLs(B $BLt(B $BLu(B $BLv(B $BLw(B $BLx(B $BLy(B $BLz(B $BL{(B $BL|(B $BL}(B $BL~(B
+ $BM!(B $BM"(B $BM#(B $BM$(B $BM%(B $BM&(B $BM'(B $BM((B $BM)(B $BM*(B $BM+(B $BM,(B $BM-(B $BM.(B $BM/(B
+$BM0(B $BM1(B $BM2(B $BM3(B $BM4(B $BM5(B $BM6(B $BM7(B $BM8(B $BM9(B $BM:(B $BM;(B $BM<(B $BM=(B $BM>(B $BM?(B
+$BM@(B $BMA(B $BMB(B $BMC(B $BMD(B $BME(B $BMF(B $BMG(B $BMH(B $BMI(B $BMJ(B $BMK(B $BML(B $BMM(B $BMN(B $BMO(B
+$BMP(B $BMQ(B $BMR(B $BMS(B $BMT(B $BMU(B $BMV(B $BMW(B $BMX(B $BMY(B $BMZ(B $BM[(B $BM\(B $BM](B $BM^(B $BM_(B
+$BM`(B $BMa(B $BMb(B $BMc(B $BMd(B $BMe(B $BMf(B $BMg(B $BMh(B $BMi(B $BMj(B $BMk(B $BMl(B $BMm(B $BMn(B $BMo(B
+$BMp(B $BMq(B $BMr(B $BMs(B $BMt(B $BMu(B $BMv(B $BMw(B $BMx(B $BMy(B $BMz(B $BM{(B $BM|(B $BM}(B $BM~(B
+ $BN!(B $BN"(B $BN#(B $BN$(B $BN%(B $BN&(B $BN'(B $BN((B $BN)(B $BN*(B $BN+(B $BN,(B $BN-(B $BN.(B $BN/(B
+$BN0(B $BN1(B $BN2(B $BN3(B $BN4(B $BN5(B $BN6(B $BN7(B $BN8(B $BN9(B $BN:(B $BN;(B $BN<(B $BN=(B $BN>(B $BN?(B
+$BN@(B $BNA(B $BNB(B $BNC(B $BND(B $BNE(B $BNF(B $BNG(B $BNH(B $BNI(B $BNJ(B $BNK(B $BNL(B $BNM(B $BNN(B $BNO(B
+$BNP(B $BNQ(B $BNR(B $BNS(B $BNT(B $BNU(B $BNV(B $BNW(B $BNX(B $BNY(B $BNZ(B $BN[(B $BN\(B $BN](B $BN^(B $BN_(B
+$BN`(B $BNa(B $BNb(B $BNc(B $BNd(B $BNe(B $BNf(B $BNg(B $BNh(B $BNi(B $BNj(B $BNk(B $BNl(B $BNm(B $BNn(B $BNo(B
+$BNp(B $BNq(B $BNr(B $BNs(B $BNt(B $BNu(B $BNv(B $BNw(B $BNx(B $BNy(B $BNz(B $BN{(B $BN|(B $BN}(B $BN~(B
+ $BO!(B $BO"(B $BO#(B $BO$(B $BO%(B $BO&(B $BO'(B $BO((B $BO)(B $BO*(B $BO+(B $BO,(B $BO-(B $BO.(B $BO/(B
+$BO0(B $BO1(B $BO2(B $BO3(B $BO4(B $BO5(B $BO6(B $BO7(B $BO8(B $BO9(B $BO:(B $BO;(B $BO<(B $BO=(B $BO>(B $BO?(B
+$BO@(B $BOA(B $BOB(B $BOC(B $BOD(B $BOE(B $BOF(B $BOG(B $BOH(B $BOI(B $BOJ(B $BOK(B $BOL(B $BOM(B $BON(B $BOO(B
+$BOP(B $BOQ(B $BOR(B $BOS(B
+ $BP!(B $BP"(B $BP#(B $BP$(B $BP%(B $BP&(B $BP'(B $BP((B $BP)(B $BP*(B $BP+(B $BP,(B $BP-(B $BP.(B $BP/(B
+$BP0(B $BP1(B $BP2(B $BP3(B $BP4(B $BP5(B $BP6(B $BP7(B $BP8(B $BP9(B $BP:(B $BP;(B $BP<(B $BP=(B $BP>(B $BP?(B
+$BP@(B $BPA(B $BPB(B $BPC(B $BPD(B $BPE(B $BPF(B $BPG(B $BPH(B $BPI(B $BPJ(B $BPK(B $BPL(B $BPM(B $BPN(B $BPO(B
+$BPP(B $BPQ(B $BPR(B $BPS(B $BPT(B $BPU(B $BPV(B $BPW(B $BPX(B $BPY(B $BPZ(B $BP[(B $BP\(B $BP](B $BP^(B $BP_(B
+$BP`(B $BPa(B $BPb(B $BPc(B $BPd(B $BPe(B $BPf(B $BPg(B $BPh(B $BPi(B $BPj(B $BPk(B $BPl(B $BPm(B $BPn(B $BPo(B
+$BPp(B $BPq(B $BPr(B $BPs(B $BPt(B $BPu(B $BPv(B $BPw(B $BPx(B $BPy(B $BPz(B $BP{(B $BP|(B $BP}(B $BP~(B
+ $BQ!(B $BQ"(B $BQ#(B $BQ$(B $BQ%(B $BQ&(B $BQ'(B $BQ((B $BQ)(B $BQ*(B $BQ+(B $BQ,(B $BQ-(B $BQ.(B $BQ/(B
+$BQ0(B $BQ1(B $BQ2(B $BQ3(B $BQ4(B $BQ5(B $BQ6(B $BQ7(B $BQ8(B $BQ9(B $BQ:(B $BQ;(B $BQ<(B $BQ=(B $BQ>(B $BQ?(B
+$BQ@(B $BQA(B $BQB(B $BQC(B $BQD(B $BQE(B $BQF(B $BQG(B $BQH(B $BQI(B $BQJ(B $BQK(B $BQL(B $BQM(B $BQN(B $BQO(B
+$BQP(B $BQQ(B $BQR(B $BQS(B $BQT(B $BQU(B $BQV(B $BQW(B $BQX(B $BQY(B $BQZ(B $BQ[(B $BQ\(B $BQ](B $BQ^(B $BQ_(B
+$BQ`(B $BQa(B $BQb(B $BQc(B $BQd(B $BQe(B $BQf(B $BQg(B $BQh(B $BQi(B $BQj(B $BQk(B $BQl(B $BQm(B $BQn(B $BQo(B
+$BQp(B $BQq(B $BQr(B $BQs(B $BQt(B $BQu(B $BQv(B $BQw(B $BQx(B $BQy(B $BQz(B $BQ{(B $BQ|(B $BQ}(B $BQ~(B
+ $BR!(B $BR"(B $BR#(B $BR$(B $BR%(B $BR&(B $BR'(B $BR((B $BR)(B $BR*(B $BR+(B $BR,(B $BR-(B $BR.(B $BR/(B
+$BR0(B $BR1(B $BR2(B $BR3(B $BR4(B $BR5(B $BR6(B $BR7(B $BR8(B $BR9(B $BR:(B $BR;(B $BR<(B $BR=(B $BR>(B $BR?(B
+$BR@(B $BRA(B $BRB(B $BRC(B $BRD(B $BRE(B $BRF(B $BRG(B $BRH(B $BRI(B $BRJ(B $BRK(B $BRL(B $BRM(B $BRN(B $BRO(B
+$BRP(B $BRQ(B $BRR(B $BRS(B $BRT(B $BRU(B $BRV(B $BRW(B $BRX(B $BRY(B $BRZ(B $BR[(B $BR\(B $BR](B $BR^(B $BR_(B
+$BR`(B $BRa(B $BRb(B $BRc(B $BRd(B $BRe(B $BRf(B $BRg(B $BRh(B $BRi(B $BRj(B $BRk(B $BRl(B $BRm(B $BRn(B $BRo(B
+$BRp(B $BRq(B $BRr(B $BRs(B $BRt(B $BRu(B $BRv(B $BRw(B $BRx(B $BRy(B $BRz(B $BR{(B $BR|(B $BR}(B $BR~(B
+ $BS!(B $BS"(B $BS#(B $BS$(B $BS%(B $BS&(B $BS'(B $BS((B $BS)(B $BS*(B $BS+(B $BS,(B $BS-(B $BS.(B $BS/(B
+$BS0(B $BS1(B $BS2(B $BS3(B $BS4(B $BS5(B $BS6(B $BS7(B $BS8(B $BS9(B $BS:(B $BS;(B $BS<(B $BS=(B $BS>(B $BS?(B
+$BS@(B $BSA(B $BSB(B $BSC(B $BSD(B $BSE(B $BSF(B $BSG(B $BSH(B $BSI(B $BSJ(B $BSK(B $BSL(B $BSM(B $BSN(B $BSO(B
+$BSP(B $BSQ(B $BSR(B $BSS(B $BST(B $BSU(B $BSV(B $BSW(B $BSX(B $BSY(B $BSZ(B $BS[(B $BS\(B $BS](B $BS^(B $BS_(B
+$BS`(B $BSa(B $BSb(B $BSc(B $BSd(B $BSe(B $BSf(B $BSg(B $BSh(B $BSi(B $BSj(B $BSk(B $BSl(B $BSm(B $BSn(B $BSo(B
+$BSp(B $BSq(B $BSr(B $BSs(B $BSt(B $BSu(B $BSv(B $BSw(B $BSx(B $BSy(B $BSz(B $BS{(B $BS|(B $BS}(B $BS~(B
+ $BT!(B $BT"(B $BT#(B $BT$(B $BT%(B $BT&(B $BT'(B $BT((B $BT)(B $BT*(B $BT+(B $BT,(B $BT-(B $BT.(B $BT/(B
+$BT0(B $BT1(B $BT2(B $BT3(B $BT4(B $BT5(B $BT6(B $BT7(B $BT8(B $BT9(B $BT:(B $BT;(B $BT<(B $BT=(B $BT>(B $BT?(B
+$BT@(B $BTA(B $BTB(B $BTC(B $BTD(B $BTE(B $BTF(B $BTG(B $BTH(B $BTI(B $BTJ(B $BTK(B $BTL(B $BTM(B $BTN(B $BTO(B
+$BTP(B $BTQ(B $BTR(B $BTS(B $BTT(B $BTU(B $BTV(B $BTW(B $BTX(B $BTY(B $BTZ(B $BT[(B $BT\(B $BT](B $BT^(B $BT_(B
+$BT`(B $BTa(B $BTb(B $BTc(B $BTd(B $BTe(B $BTf(B $BTg(B $BTh(B $BTi(B $BTj(B $BTk(B $BTl(B $BTm(B $BTn(B $BTo(B
+$BTp(B $BTq(B $BTr(B $BTs(B $BTt(B $BTu(B $BTv(B $BTw(B $BTx(B $BTy(B $BTz(B $BT{(B $BT|(B $BT}(B $BT~(B
+ $BU!(B $BU"(B $BU#(B $BU$(B $BU%(B $BU&(B $BU'(B $BU((B $BU)(B $BU*(B $BU+(B $BU,(B $BU-(B $BU.(B $BU/(B
+$BU0(B $BU1(B $BU2(B $BU3(B $BU4(B $BU5(B $BU6(B $BU7(B $BU8(B $BU9(B $BU:(B $BU;(B $BU<(B $BU=(B $BU>(B $BU?(B
+$BU@(B $BUA(B $BUB(B $BUC(B $BUD(B $BUE(B $BUF(B $BUG(B $BUH(B $BUI(B $BUJ(B $BUK(B $BUL(B $BUM(B $BUN(B $BUO(B
+$BUP(B $BUQ(B $BUR(B $BUS(B $BUT(B $BUU(B $BUV(B $BUW(B $BUX(B $BUY(B $BUZ(B $BU[(B $BU\(B $BU](B $BU^(B $BU_(B
+$BU`(B $BUa(B $BUb(B $BUc(B $BUd(B $BUe(B $BUf(B $BUg(B $BUh(B $BUi(B $BUj(B $BUk(B $BUl(B $BUm(B $BUn(B $BUo(B
+$BUp(B $BUq(B $BUr(B $BUs(B $BUt(B $BUu(B $BUv(B $BUw(B $BUx(B $BUy(B $BUz(B $BU{(B $BU|(B $BU}(B $BU~(B
+ $BV!(B $BV"(B $BV#(B $BV$(B $BV%(B $BV&(B $BV'(B $BV((B $BV)(B $BV*(B $BV+(B $BV,(B $BV-(B $BV.(B $BV/(B
+$BV0(B $BV1(B $BV2(B $BV3(B $BV4(B $BV5(B $BV6(B $BV7(B $BV8(B $BV9(B $BV:(B $BV;(B $BV<(B $BV=(B $BV>(B $BV?(B
+$BV@(B $BVA(B $BVB(B $BVC(B $BVD(B $BVE(B $BVF(B $BVG(B $BVH(B $BVI(B $BVJ(B $BVK(B $BVL(B $BVM(B $BVN(B $BVO(B
+$BVP(B $BVQ(B $BVR(B $BVS(B $BVT(B $BVU(B $BVV(B $BVW(B $BVX(B $BVY(B $BVZ(B $BV[(B $BV\(B $BV](B $BV^(B $BV_(B
+$BV`(B $BVa(B $BVb(B $BVc(B $BVd(B $BVe(B $BVf(B $BVg(B $BVh(B $BVi(B $BVj(B $BVk(B $BVl(B $BVm(B $BVn(B $BVo(B
+$BVp(B $BVq(B $BVr(B $BVs(B $BVt(B $BVu(B $BVv(B $BVw(B $BVx(B $BVy(B $BVz(B $BV{(B $BV|(B $BV}(B $BV~(B
+ $BW!(B $BW"(B $BW#(B $BW$(B $BW%(B $BW&(B $BW'(B $BW((B $BW)(B $BW*(B $BW+(B $BW,(B $BW-(B $BW.(B $BW/(B
+$BW0(B $BW1(B $BW2(B $BW3(B $BW4(B $BW5(B $BW6(B $BW7(B $BW8(B $BW9(B $BW:(B $BW;(B $BW<(B $BW=(B $BW>(B $BW?(B
+$BW@(B $BWA(B $BWB(B $BWC(B $BWD(B $BWE(B $BWF(B $BWG(B $BWH(B $BWI(B $BWJ(B $BWK(B $BWL(B $BWM(B $BWN(B $BWO(B
+$BWP(B $BWQ(B $BWR(B $BWS(B $BWT(B $BWU(B $BWV(B $BWW(B $BWX(B $BWY(B $BWZ(B $BW[(B $BW\(B $BW](B $BW^(B $BW_(B
+$BW`(B $BWa(B $BWb(B $BWc(B $BWd(B $BWe(B $BWf(B $BWg(B $BWh(B $BWi(B $BWj(B $BWk(B $BWl(B $BWm(B $BWn(B $BWo(B
+$BWp(B $BWq(B $BWr(B $BWs(B $BWt(B $BWu(B $BWv(B $BWw(B $BWx(B $BWy(B $BWz(B $BW{(B $BW|(B $BW}(B $BW~(B
+ $BX!(B $BX"(B $BX#(B $BX$(B $BX%(B $BX&(B $BX'(B $BX((B $BX)(B $BX*(B $BX+(B $BX,(B $BX-(B $BX.(B $BX/(B
+$BX0(B $BX1(B $BX2(B $BX3(B $BX4(B $BX5(B $BX6(B $BX7(B $BX8(B $BX9(B $BX:(B $BX;(B $BX<(B $BX=(B $BX>(B $BX?(B
+$BX@(B $BXA(B $BXB(B $BXC(B $BXD(B $BXE(B $BXF(B $BXG(B $BXH(B $BXI(B $BXJ(B $BXK(B $BXL(B $BXM(B $BXN(B $BXO(B
+$BXP(B $BXQ(B $BXR(B $BXS(B $BXT(B $BXU(B $BXV(B $BXW(B $BXX(B $BXY(B $BXZ(B $BX[(B $BX\(B $BX](B $BX^(B $BX_(B
+$BX`(B $BXa(B $BXb(B $BXc(B $BXd(B $BXe(B $BXf(B $BXg(B $BXh(B $BXi(B $BXj(B $BXk(B $BXl(B $BXm(B $BXn(B $BXo(B
+$BXp(B $BXq(B $BXr(B $BXs(B $BXt(B $BXu(B $BXv(B $BXw(B $BXx(B $BXy(B $BXz(B $BX{(B $BX|(B $BX}(B $BX~(B
+ $BY!(B $BY"(B $BY#(B $BY$(B $BY%(B $BY&(B $BY'(B $BY((B $BY)(B $BY*(B $BY+(B $BY,(B $BY-(B $BY.(B $BY/(B
+$BY0(B $BY1(B $BY2(B $BY3(B $BY4(B $BY5(B $BY6(B $BY7(B $BY8(B $BY9(B $BY:(B $BY;(B $BY<(B $BY=(B $BY>(B $BY?(B
+$BY@(B $BYA(B $BYB(B $BYC(B $BYD(B $BYE(B $BYF(B $BYG(B $BYH(B $BYI(B $BYJ(B $BYK(B $BYL(B $BYM(B $BYN(B $BYO(B
+$BYP(B $BYQ(B $BYR(B $BYS(B $BYT(B $BYU(B $BYV(B $BYW(B $BYX(B $BYY(B $BYZ(B $BY[(B $BY\(B $BY](B $BY^(B $BY_(B
+$BY`(B $BYa(B $BYb(B $BYc(B $BYd(B $BYe(B $BYf(B $BYg(B $BYh(B $BYi(B $BYj(B $BYk(B $BYl(B $BYm(B $BYn(B $BYo(B
+$BYp(B $BYq(B $BYr(B $BYs(B $BYt(B $BYu(B $BYv(B $BYw(B $BYx(B $BYy(B $BYz(B $BY{(B $BY|(B $BY}(B $BY~(B
+ $BZ!(B $BZ"(B $BZ#(B $BZ$(B $BZ%(B $BZ&(B $BZ'(B $BZ((B $BZ)(B $BZ*(B $BZ+(B $BZ,(B $BZ-(B $BZ.(B $BZ/(B
+$BZ0(B $BZ1(B $BZ2(B $BZ3(B $BZ4(B $BZ5(B $BZ6(B $BZ7(B $BZ8(B $BZ9(B $BZ:(B $BZ;(B $BZ<(B $BZ=(B $BZ>(B $BZ?(B
+$BZ@(B $BZA(B $BZB(B $BZC(B $BZD(B $BZE(B $BZF(B $BZG(B $BZH(B $BZI(B $BZJ(B $BZK(B $BZL(B $BZM(B $BZN(B $BZO(B
+$BZP(B $BZQ(B $BZR(B $BZS(B $BZT(B $BZU(B $BZV(B $BZW(B $BZX(B $BZY(B $BZZ(B $BZ[(B $BZ\(B $BZ](B $BZ^(B $BZ_(B
+$BZ`(B $BZa(B $BZb(B $BZc(B $BZd(B $BZe(B $BZf(B $BZg(B $BZh(B $BZi(B $BZj(B $BZk(B $BZl(B $BZm(B $BZn(B $BZo(B
+$BZp(B $BZq(B $BZr(B $BZs(B $BZt(B $BZu(B $BZv(B $BZw(B $BZx(B $BZy(B $BZz(B $BZ{(B $BZ|(B $BZ}(B $BZ~(B
+ $B[!(B $B["(B $B[#(B $B[$(B $B[%(B $B[&(B $B['(B $B[((B $B[)(B $B[*(B $B[+(B $B[,(B $B[-(B $B[.(B $B[/(B
+$B[0(B $B[1(B $B[2(B $B[3(B $B[4(B $B[5(B $B[6(B $B[7(B $B[8(B $B[9(B $B[:(B $B[;(B $B[<(B $B[=(B $B[>(B $B[?(B
+$B[@(B $B[A(B $B[B(B $B[C(B $B[D(B $B[E(B $B[F(B $B[G(B $B[H(B $B[I(B $B[J(B $B[K(B $B[L(B $B[M(B $B[N(B $B[O(B
+$B[P(B $B[Q(B $B[R(B $B[S(B $B[T(B $B[U(B $B[V(B $B[W(B $B[X(B $B[Y(B $B[Z(B $B[[(B $B[\(B $B[](B $B[^(B $B[_(B
+$B[`(B $B[a(B $B[b(B $B[c(B $B[d(B $B[e(B $B[f(B $B[g(B $B[h(B $B[i(B $B[j(B $B[k(B $B[l(B $B[m(B $B[n(B $B[o(B
+$B[p(B $B[q(B $B[r(B $B[s(B $B[t(B $B[u(B $B[v(B $B[w(B $B[x(B $B[y(B $B[z(B $B[{(B $B[|(B $B[}(B $B[~(B
+ $B\!(B $B\"(B $B\#(B $B\$(B $B\%(B $B\&(B $B\'(B $B\((B $B\)(B $B\*(B $B\+(B $B\,(B $B\-(B $B\.(B $B\/(B
+$B\0(B $B\1(B $B\2(B $B\3(B $B\4(B $B\5(B $B\6(B $B\7(B $B\8(B $B\9(B $B\:(B $B\;(B $B\<(B $B\=(B $B\>(B $B\?(B
+$B\@(B $B\A(B $B\B(B $B\C(B $B\D(B $B\E(B $B\F(B $B\G(B $B\H(B $B\I(B $B\J(B $B\K(B $B\L(B $B\M(B $B\N(B $B\O(B
+$B\P(B $B\Q(B $B\R(B $B\S(B $B\T(B $B\U(B $B\V(B $B\W(B $B\X(B $B\Y(B $B\Z(B $B\[(B $B\\(B $B\](B $B\^(B $B\_(B
+$B\`(B $B\a(B $B\b(B $B\c(B $B\d(B $B\e(B $B\f(B $B\g(B $B\h(B $B\i(B $B\j(B $B\k(B $B\l(B $B\m(B $B\n(B $B\o(B
+$B\p(B $B\q(B $B\r(B $B\s(B $B\t(B $B\u(B $B\v(B $B\w(B $B\x(B $B\y(B $B\z(B $B\{(B $B\|(B $B\}(B $B\~(B
+ $B]!(B $B]"(B $B]#(B $B]$(B $B]%(B $B]&(B $B]'(B $B]((B $B])(B $B]*(B $B]+(B $B],(B $B]-(B $B].(B $B]/(B
+$B]0(B $B]1(B $B]2(B $B]3(B $B]4(B $B]5(B $B]6(B $B]7(B $B]8(B $B]9(B $B]:(B $B];(B $B]<(B $B]=(B $B]>(B $B]?(B
+$B]@(B $B]A(B $B]B(B $B]C(B $B]D(B $B]E(B $B]F(B $B]G(B $B]H(B $B]I(B $B]J(B $B]K(B $B]L(B $B]M(B $B]N(B $B]O(B
+$B]P(B $B]Q(B $B]R(B $B]S(B $B]T(B $B]U(B $B]V(B $B]W(B $B]X(B $B]Y(B $B]Z(B $B][(B $B]\(B $B]](B $B]^(B $B]_(B
+$B]`(B $B]a(B $B]b(B $B]c(B $B]d(B $B]e(B $B]f(B $B]g(B $B]h(B $B]i(B $B]j(B $B]k(B $B]l(B $B]m(B $B]n(B $B]o(B
+$B]p(B $B]q(B $B]r(B $B]s(B $B]t(B $B]u(B $B]v(B $B]w(B $B]x(B $B]y(B $B]z(B $B]{(B $B]|(B $B]}(B $B]~(B
+ $B^!(B $B^"(B $B^#(B $B^$(B $B^%(B $B^&(B $B^'(B $B^((B $B^)(B $B^*(B $B^+(B $B^,(B $B^-(B $B^.(B $B^/(B
+$B^0(B $B^1(B $B^2(B $B^3(B $B^4(B $B^5(B $B^6(B $B^7(B $B^8(B $B^9(B $B^:(B $B^;(B $B^<(B $B^=(B $B^>(B $B^?(B
+$B^@(B $B^A(B $B^B(B $B^C(B $B^D(B $B^E(B $B^F(B $B^G(B $B^H(B $B^I(B $B^J(B $B^K(B $B^L(B $B^M(B $B^N(B $B^O(B
+$B^P(B $B^Q(B $B^R(B $B^S(B $B^T(B $B^U(B $B^V(B $B^W(B $B^X(B $B^Y(B $B^Z(B $B^[(B $B^\(B $B^](B $B^^(B $B^_(B
+$B^`(B $B^a(B $B^b(B $B^c(B $B^d(B $B^e(B $B^f(B $B^g(B $B^h(B $B^i(B $B^j(B $B^k(B $B^l(B $B^m(B $B^n(B $B^o(B
+$B^p(B $B^q(B $B^r(B $B^s(B $B^t(B $B^u(B $B^v(B $B^w(B $B^x(B $B^y(B $B^z(B $B^{(B $B^|(B $B^}(B $B^~(B
+ $B_!(B $B_"(B $B_#(B $B_$(B $B_%(B $B_&(B $B_'(B $B_((B $B_)(B $B_*(B $B_+(B $B_,(B $B_-(B $B_.(B $B_/(B
+$B_0(B $B_1(B $B_2(B $B_3(B $B_4(B $B_5(B $B_6(B $B_7(B $B_8(B $B_9(B $B_:(B $B_;(B $B_<(B $B_=(B $B_>(B $B_?(B
+$B_@(B $B_A(B $B_B(B $B_C(B $B_D(B $B_E(B $B_F(B $B_G(B $B_H(B $B_I(B $B_J(B $B_K(B $B_L(B $B_M(B $B_N(B $B_O(B
+$B_P(B $B_Q(B $B_R(B $B_S(B $B_T(B $B_U(B $B_V(B $B_W(B $B_X(B $B_Y(B $B_Z(B $B_[(B $B_\(B $B_](B $B_^(B $B__(B
+$B_`(B $B_a(B $B_b(B $B_c(B $B_d(B $B_e(B $B_f(B $B_g(B $B_h(B $B_i(B $B_j(B $B_k(B $B_l(B $B_m(B $B_n(B $B_o(B
+$B_p(B $B_q(B $B_r(B $B_s(B $B_t(B $B_u(B $B_v(B $B_w(B $B_x(B $B_y(B $B_z(B $B_{(B $B_|(B $B_}(B $B_~(B
+ $B`!(B $B`"(B $B`#(B $B`$(B $B`%(B $B`&(B $B`'(B $B`((B $B`)(B $B`*(B $B`+(B $B`,(B $B`-(B $B`.(B $B`/(B
+$B`0(B $B`1(B $B`2(B $B`3(B $B`4(B $B`5(B $B`6(B $B`7(B $B`8(B $B`9(B $B`:(B $B`;(B $B`<(B $B`=(B $B`>(B $B`?(B
+$B`@(B $B`A(B $B`B(B $B`C(B $B`D(B $B`E(B $B`F(B $B`G(B $B`H(B $B`I(B $B`J(B $B`K(B $B`L(B $B`M(B $B`N(B $B`O(B
+$B`P(B $B`Q(B $B`R(B $B`S(B $B`T(B $B`U(B $B`V(B $B`W(B $B`X(B $B`Y(B $B`Z(B $B`[(B $B`\(B $B`](B $B`^(B $B`_(B
+$B``(B $B`a(B $B`b(B $B`c(B $B`d(B $B`e(B $B`f(B $B`g(B $B`h(B $B`i(B $B`j(B $B`k(B $B`l(B $B`m(B $B`n(B $B`o(B
+$B`p(B $B`q(B $B`r(B $B`s(B $B`t(B $B`u(B $B`v(B $B`w(B $B`x(B $B`y(B $B`z(B $B`{(B $B`|(B $B`}(B $B`~(B
+ $Ba!(B $Ba"(B $Ba#(B $Ba$(B $Ba%(B $Ba&(B $Ba'(B $Ba((B $Ba)(B $Ba*(B $Ba+(B $Ba,(B $Ba-(B $Ba.(B $Ba/(B
+$Ba0(B $Ba1(B $Ba2(B $Ba3(B $Ba4(B $Ba5(B $Ba6(B $Ba7(B $Ba8(B $Ba9(B $Ba:(B $Ba;(B $Ba<(B $Ba=(B $Ba>(B $Ba?(B
+$Ba@(B $BaA(B $BaB(B $BaC(B $BaD(B $BaE(B $BaF(B $BaG(B $BaH(B $BaI(B $BaJ(B $BaK(B $BaL(B $BaM(B $BaN(B $BaO(B
+$BaP(B $BaQ(B $BaR(B $BaS(B $BaT(B $BaU(B $BaV(B $BaW(B $BaX(B $BaY(B $BaZ(B $Ba[(B $Ba\(B $Ba](B $Ba^(B $Ba_(B
+$Ba`(B $Baa(B $Bab(B $Bac(B $Bad(B $Bae(B $Baf(B $Bag(B $Bah(B $Bai(B $Baj(B $Bak(B $Bal(B $Bam(B $Ban(B $Bao(B
+$Bap(B $Baq(B $Bar(B $Bas(B $Bat(B $Bau(B $Bav(B $Baw(B $Bax(B $Bay(B $Baz(B $Ba{(B $Ba|(B $Ba}(B $Ba~(B
+ $Bb!(B $Bb"(B $Bb#(B $Bb$(B $Bb%(B $Bb&(B $Bb'(B $Bb((B $Bb)(B $Bb*(B $Bb+(B $Bb,(B $Bb-(B $Bb.(B $Bb/(B
+$Bb0(B $Bb1(B $Bb2(B $Bb3(B $Bb4(B $Bb5(B $Bb6(B $Bb7(B $Bb8(B $Bb9(B $Bb:(B $Bb;(B $Bb<(B $Bb=(B $Bb>(B $Bb?(B
+$Bb@(B $BbA(B $BbB(B $BbC(B $BbD(B $BbE(B $BbF(B $BbG(B $BbH(B $BbI(B $BbJ(B $BbK(B $BbL(B $BbM(B $BbN(B $BbO(B
+$BbP(B $BbQ(B $BbR(B $BbS(B $BbT(B $BbU(B $BbV(B $BbW(B $BbX(B $BbY(B $BbZ(B $Bb[(B $Bb\(B $Bb](B $Bb^(B $Bb_(B
+$Bb`(B $Bba(B $Bbb(B $Bbc(B $Bbd(B $Bbe(B $Bbf(B $Bbg(B $Bbh(B $Bbi(B $Bbj(B $Bbk(B $Bbl(B $Bbm(B $Bbn(B $Bbo(B
+$Bbp(B $Bbq(B $Bbr(B $Bbs(B $Bbt(B $Bbu(B $Bbv(B $Bbw(B $Bbx(B $Bby(B $Bbz(B $Bb{(B $Bb|(B $Bb}(B $Bb~(B
+ $Bc!(B $Bc"(B $Bc#(B $Bc$(B $Bc%(B $Bc&(B $Bc'(B $Bc((B $Bc)(B $Bc*(B $Bc+(B $Bc,(B $Bc-(B $Bc.(B $Bc/(B
+$Bc0(B $Bc1(B $Bc2(B $Bc3(B $Bc4(B $Bc5(B $Bc6(B $Bc7(B $Bc8(B $Bc9(B $Bc:(B $Bc;(B $Bc<(B $Bc=(B $Bc>(B $Bc?(B
+$Bc@(B $BcA(B $BcB(B $BcC(B $BcD(B $BcE(B $BcF(B $BcG(B $BcH(B $BcI(B $BcJ(B $BcK(B $BcL(B $BcM(B $BcN(B $BcO(B
+$BcP(B $BcQ(B $BcR(B $BcS(B $BcT(B $BcU(B $BcV(B $BcW(B $BcX(B $BcY(B $BcZ(B $Bc[(B $Bc\(B $Bc](B $Bc^(B $Bc_(B
+$Bc`(B $Bca(B $Bcb(B $Bcc(B $Bcd(B $Bce(B $Bcf(B $Bcg(B $Bch(B $Bci(B $Bcj(B $Bck(B $Bcl(B $Bcm(B $Bcn(B $Bco(B
+$Bcp(B $Bcq(B $Bcr(B $Bcs(B $Bct(B $Bcu(B $Bcv(B $Bcw(B $Bcx(B $Bcy(B $Bcz(B $Bc{(B $Bc|(B $Bc}(B $Bc~(B
+ $Bd!(B $Bd"(B $Bd#(B $Bd$(B $Bd%(B $Bd&(B $Bd'(B $Bd((B $Bd)(B $Bd*(B $Bd+(B $Bd,(B $Bd-(B $Bd.(B $Bd/(B
+$Bd0(B $Bd1(B $Bd2(B $Bd3(B $Bd4(B $Bd5(B $Bd6(B $Bd7(B $Bd8(B $Bd9(B $Bd:(B $Bd;(B $Bd<(B $Bd=(B $Bd>(B $Bd?(B
+$Bd@(B $BdA(B $BdB(B $BdC(B $BdD(B $BdE(B $BdF(B $BdG(B $BdH(B $BdI(B $BdJ(B $BdK(B $BdL(B $BdM(B $BdN(B $BdO(B
+$BdP(B $BdQ(B $BdR(B $BdS(B $BdT(B $BdU(B $BdV(B $BdW(B $BdX(B $BdY(B $BdZ(B $Bd[(B $Bd\(B $Bd](B $Bd^(B $Bd_(B
+$Bd`(B $Bda(B $Bdb(B $Bdc(B $Bdd(B $Bde(B $Bdf(B $Bdg(B $Bdh(B $Bdi(B $Bdj(B $Bdk(B $Bdl(B $Bdm(B $Bdn(B $Bdo(B
+$Bdp(B $Bdq(B $Bdr(B $Bds(B $Bdt(B $Bdu(B $Bdv(B $Bdw(B $Bdx(B $Bdy(B $Bdz(B $Bd{(B $Bd|(B $Bd}(B $Bd~(B
+ $Be!(B $Be"(B $Be#(B $Be$(B $Be%(B $Be&(B $Be'(B $Be((B $Be)(B $Be*(B $Be+(B $Be,(B $Be-(B $Be.(B $Be/(B
+$Be0(B $Be1(B $Be2(B $Be3(B $Be4(B $Be5(B $Be6(B $Be7(B $Be8(B $Be9(B $Be:(B $Be;(B $Be<(B $Be=(B $Be>(B $Be?(B
+$Be@(B $BeA(B $BeB(B $BeC(B $BeD(B $BeE(B $BeF(B $BeG(B $BeH(B $BeI(B $BeJ(B $BeK(B $BeL(B $BeM(B $BeN(B $BeO(B
+$BeP(B $BeQ(B $BeR(B $BeS(B $BeT(B $BeU(B $BeV(B $BeW(B $BeX(B $BeY(B $BeZ(B $Be[(B $Be\(B $Be](B $Be^(B $Be_(B
+$Be`(B $Bea(B $Beb(B $Bec(B $Bed(B $Bee(B $Bef(B $Beg(B $Beh(B $Bei(B $Bej(B $Bek(B $Bel(B $Bem(B $Ben(B $Beo(B
+$Bep(B $Beq(B $Ber(B $Bes(B $Bet(B $Beu(B $Bev(B $Bew(B $Bex(B $Bey(B $Bez(B $Be{(B $Be|(B $Be}(B $Be~(B
+ $Bf!(B $Bf"(B $Bf#(B $Bf$(B $Bf%(B $Bf&(B $Bf'(B $Bf((B $Bf)(B $Bf*(B $Bf+(B $Bf,(B $Bf-(B $Bf.(B $Bf/(B
+$Bf0(B $Bf1(B $Bf2(B $Bf3(B $Bf4(B $Bf5(B $Bf6(B $Bf7(B $Bf8(B $Bf9(B $Bf:(B $Bf;(B $Bf<(B $Bf=(B $Bf>(B $Bf?(B
+$Bf@(B $BfA(B $BfB(B $BfC(B $BfD(B $BfE(B $BfF(B $BfG(B $BfH(B $BfI(B $BfJ(B $BfK(B $BfL(B $BfM(B $BfN(B $BfO(B
+$BfP(B $BfQ(B $BfR(B $BfS(B $BfT(B $BfU(B $BfV(B $BfW(B $BfX(B $BfY(B $BfZ(B $Bf[(B $Bf\(B $Bf](B $Bf^(B $Bf_(B
+$Bf`(B $Bfa(B $Bfb(B $Bfc(B $Bfd(B $Bfe(B $Bff(B $Bfg(B $Bfh(B $Bfi(B $Bfj(B $Bfk(B $Bfl(B $Bfm(B $Bfn(B $Bfo(B
+$Bfp(B $Bfq(B $Bfr(B $Bfs(B $Bft(B $Bfu(B $Bfv(B $Bfw(B $Bfx(B $Bfy(B $Bfz(B $Bf{(B $Bf|(B $Bf}(B $Bf~(B
+ $Bg!(B $Bg"(B $Bg#(B $Bg$(B $Bg%(B $Bg&(B $Bg'(B $Bg((B $Bg)(B $Bg*(B $Bg+(B $Bg,(B $Bg-(B $Bg.(B $Bg/(B
+$Bg0(B $Bg1(B $Bg2(B $Bg3(B $Bg4(B $Bg5(B $Bg6(B $Bg7(B $Bg8(B $Bg9(B $Bg:(B $Bg;(B $Bg<(B $Bg=(B $Bg>(B $Bg?(B
+$Bg@(B $BgA(B $BgB(B $BgC(B $BgD(B $BgE(B $BgF(B $BgG(B $BgH(B $BgI(B $BgJ(B $BgK(B $BgL(B $BgM(B $BgN(B $BgO(B
+$BgP(B $BgQ(B $BgR(B $BgS(B $BgT(B $BgU(B $BgV(B $BgW(B $BgX(B $BgY(B $BgZ(B $Bg[(B $Bg\(B $Bg](B $Bg^(B $Bg_(B
+$Bg`(B $Bga(B $Bgb(B $Bgc(B $Bgd(B $Bge(B $Bgf(B $Bgg(B $Bgh(B $Bgi(B $Bgj(B $Bgk(B $Bgl(B $Bgm(B $Bgn(B $Bgo(B
+$Bgp(B $Bgq(B $Bgr(B $Bgs(B $Bgt(B $Bgu(B $Bgv(B $Bgw(B $Bgx(B $Bgy(B $Bgz(B $Bg{(B $Bg|(B $Bg}(B $Bg~(B
+ $Bh!(B $Bh"(B $Bh#(B $Bh$(B $Bh%(B $Bh&(B $Bh'(B $Bh((B $Bh)(B $Bh*(B $Bh+(B $Bh,(B $Bh-(B $Bh.(B $Bh/(B
+$Bh0(B $Bh1(B $Bh2(B $Bh3(B $Bh4(B $Bh5(B $Bh6(B $Bh7(B $Bh8(B $Bh9(B $Bh:(B $Bh;(B $Bh<(B $Bh=(B $Bh>(B $Bh?(B
+$Bh@(B $BhA(B $BhB(B $BhC(B $BhD(B $BhE(B $BhF(B $BhG(B $BhH(B $BhI(B $BhJ(B $BhK(B $BhL(B $BhM(B $BhN(B $BhO(B
+$BhP(B $BhQ(B $BhR(B $BhS(B $BhT(B $BhU(B $BhV(B $BhW(B $BhX(B $BhY(B $BhZ(B $Bh[(B $Bh\(B $Bh](B $Bh^(B $Bh_(B
+$Bh`(B $Bha(B $Bhb(B $Bhc(B $Bhd(B $Bhe(B $Bhf(B $Bhg(B $Bhh(B $Bhi(B $Bhj(B $Bhk(B $Bhl(B $Bhm(B $Bhn(B $Bho(B
+$Bhp(B $Bhq(B $Bhr(B $Bhs(B $Bht(B $Bhu(B $Bhv(B $Bhw(B $Bhx(B $Bhy(B $Bhz(B $Bh{(B $Bh|(B $Bh}(B $Bh~(B
+ $Bi!(B $Bi"(B $Bi#(B $Bi$(B $Bi%(B $Bi&(B $Bi'(B $Bi((B $Bi)(B $Bi*(B $Bi+(B $Bi,(B $Bi-(B $Bi.(B $Bi/(B
+$Bi0(B $Bi1(B $Bi2(B $Bi3(B $Bi4(B $Bi5(B $Bi6(B $Bi7(B $Bi8(B $Bi9(B $Bi:(B $Bi;(B $Bi<(B $Bi=(B $Bi>(B $Bi?(B
+$Bi@(B $BiA(B $BiB(B $BiC(B $BiD(B $BiE(B $BiF(B $BiG(B $BiH(B $BiI(B $BiJ(B $BiK(B $BiL(B $BiM(B $BiN(B $BiO(B
+$BiP(B $BiQ(B $BiR(B $BiS(B $BiT(B $BiU(B $BiV(B $BiW(B $BiX(B $BiY(B $BiZ(B $Bi[(B $Bi\(B $Bi](B $Bi^(B $Bi_(B
+$Bi`(B $Bia(B $Bib(B $Bic(B $Bid(B $Bie(B $Bif(B $Big(B $Bih(B $Bii(B $Bij(B $Bik(B $Bil(B $Bim(B $Bin(B $Bio(B
+$Bip(B $Biq(B $Bir(B $Bis(B $Bit(B $Biu(B $Biv(B $Biw(B $Bix(B $Biy(B $Biz(B $Bi{(B $Bi|(B $Bi}(B $Bi~(B
+ $Bj!(B $Bj"(B $Bj#(B $Bj$(B $Bj%(B $Bj&(B $Bj'(B $Bj((B $Bj)(B $Bj*(B $Bj+(B $Bj,(B $Bj-(B $Bj.(B $Bj/(B
+$Bj0(B $Bj1(B $Bj2(B $Bj3(B $Bj4(B $Bj5(B $Bj6(B $Bj7(B $Bj8(B $Bj9(B $Bj:(B $Bj;(B $Bj<(B $Bj=(B $Bj>(B $Bj?(B
+$Bj@(B $BjA(B $BjB(B $BjC(B $BjD(B $BjE(B $BjF(B $BjG(B $BjH(B $BjI(B $BjJ(B $BjK(B $BjL(B $BjM(B $BjN(B $BjO(B
+$BjP(B $BjQ(B $BjR(B $BjS(B $BjT(B $BjU(B $BjV(B $BjW(B $BjX(B $BjY(B $BjZ(B $Bj[(B $Bj\(B $Bj](B $Bj^(B $Bj_(B
+$Bj`(B $Bja(B $Bjb(B $Bjc(B $Bjd(B $Bje(B $Bjf(B $Bjg(B $Bjh(B $Bji(B $Bjj(B $Bjk(B $Bjl(B $Bjm(B $Bjn(B $Bjo(B
+$Bjp(B $Bjq(B $Bjr(B $Bjs(B $Bjt(B $Bju(B $Bjv(B $Bjw(B $Bjx(B $Bjy(B $Bjz(B $Bj{(B $Bj|(B $Bj}(B $Bj~(B
+ $Bk!(B $Bk"(B $Bk#(B $Bk$(B $Bk%(B $Bk&(B $Bk'(B $Bk((B $Bk)(B $Bk*(B $Bk+(B $Bk,(B $Bk-(B $Bk.(B $Bk/(B
+$Bk0(B $Bk1(B $Bk2(B $Bk3(B $Bk4(B $Bk5(B $Bk6(B $Bk7(B $Bk8(B $Bk9(B $Bk:(B $Bk;(B $Bk<(B $Bk=(B $Bk>(B $Bk?(B
+$Bk@(B $BkA(B $BkB(B $BkC(B $BkD(B $BkE(B $BkF(B $BkG(B $BkH(B $BkI(B $BkJ(B $BkK(B $BkL(B $BkM(B $BkN(B $BkO(B
+$BkP(B $BkQ(B $BkR(B $BkS(B $BkT(B $BkU(B $BkV(B $BkW(B $BkX(B $BkY(B $BkZ(B $Bk[(B $Bk\(B $Bk](B $Bk^(B $Bk_(B
+$Bk`(B $Bka(B $Bkb(B $Bkc(B $Bkd(B $Bke(B $Bkf(B $Bkg(B $Bkh(B $Bki(B $Bkj(B $Bkk(B $Bkl(B $Bkm(B $Bkn(B $Bko(B
+$Bkp(B $Bkq(B $Bkr(B $Bks(B $Bkt(B $Bku(B $Bkv(B $Bkw(B $Bkx(B $Bky(B $Bkz(B $Bk{(B $Bk|(B $Bk}(B $Bk~(B
+ $Bl!(B $Bl"(B $Bl#(B $Bl$(B $Bl%(B $Bl&(B $Bl'(B $Bl((B $Bl)(B $Bl*(B $Bl+(B $Bl,(B $Bl-(B $Bl.(B $Bl/(B
+$Bl0(B $Bl1(B $Bl2(B $Bl3(B $Bl4(B $Bl5(B $Bl6(B $Bl7(B $Bl8(B $Bl9(B $Bl:(B $Bl;(B $Bl<(B $Bl=(B $Bl>(B $Bl?(B
+$Bl@(B $BlA(B $BlB(B $BlC(B $BlD(B $BlE(B $BlF(B $BlG(B $BlH(B $BlI(B $BlJ(B $BlK(B $BlL(B $BlM(B $BlN(B $BlO(B
+$BlP(B $BlQ(B $BlR(B $BlS(B $BlT(B $BlU(B $BlV(B $BlW(B $BlX(B $BlY(B $BlZ(B $Bl[(B $Bl\(B $Bl](B $Bl^(B $Bl_(B
+$Bl`(B $Bla(B $Blb(B $Blc(B $Bld(B $Ble(B $Blf(B $Blg(B $Blh(B $Bli(B $Blj(B $Blk(B $Bll(B $Blm(B $Bln(B $Blo(B
+$Blp(B $Blq(B $Blr(B $Bls(B $Blt(B $Blu(B $Blv(B $Blw(B $Blx(B $Bly(B $Blz(B $Bl{(B $Bl|(B $Bl}(B $Bl~(B
+ $Bm!(B $Bm"(B $Bm#(B $Bm$(B $Bm%(B $Bm&(B $Bm'(B $Bm((B $Bm)(B $Bm*(B $Bm+(B $Bm,(B $Bm-(B $Bm.(B $Bm/(B
+$Bm0(B $Bm1(B $Bm2(B $Bm3(B $Bm4(B $Bm5(B $Bm6(B $Bm7(B $Bm8(B $Bm9(B $Bm:(B $Bm;(B $Bm<(B $Bm=(B $Bm>(B $Bm?(B
+$Bm@(B $BmA(B $BmB(B $BmC(B $BmD(B $BmE(B $BmF(B $BmG(B $BmH(B $BmI(B $BmJ(B $BmK(B $BmL(B $BmM(B $BmN(B $BmO(B
+$BmP(B $BmQ(B $BmR(B $BmS(B $BmT(B $BmU(B $BmV(B $BmW(B $BmX(B $BmY(B $BmZ(B $Bm[(B $Bm\(B $Bm](B $Bm^(B $Bm_(B
+$Bm`(B $Bma(B $Bmb(B $Bmc(B $Bmd(B $Bme(B $Bmf(B $Bmg(B $Bmh(B $Bmi(B $Bmj(B $Bmk(B $Bml(B $Bmm(B $Bmn(B $Bmo(B
+$Bmp(B $Bmq(B $Bmr(B $Bms(B $Bmt(B $Bmu(B $Bmv(B $Bmw(B $Bmx(B $Bmy(B $Bmz(B $Bm{(B $Bm|(B $Bm}(B $Bm~(B
+ $Bn!(B $Bn"(B $Bn#(B $Bn$(B $Bn%(B $Bn&(B $Bn'(B $Bn((B $Bn)(B $Bn*(B $Bn+(B $Bn,(B $Bn-(B $Bn.(B $Bn/(B
+$Bn0(B $Bn1(B $Bn2(B $Bn3(B $Bn4(B $Bn5(B $Bn6(B $Bn7(B $Bn8(B $Bn9(B $Bn:(B $Bn;(B $Bn<(B $Bn=(B $Bn>(B $Bn?(B
+$Bn@(B $BnA(B $BnB(B $BnC(B $BnD(B $BnE(B $BnF(B $BnG(B $BnH(B $BnI(B $BnJ(B $BnK(B $BnL(B $BnM(B $BnN(B $BnO(B
+$BnP(B $BnQ(B $BnR(B $BnS(B $BnT(B $BnU(B $BnV(B $BnW(B $BnX(B $BnY(B $BnZ(B $Bn[(B $Bn\(B $Bn](B $Bn^(B $Bn_(B
+$Bn`(B $Bna(B $Bnb(B $Bnc(B $Bnd(B $Bne(B $Bnf(B $Bng(B $Bnh(B $Bni(B $Bnj(B $Bnk(B $Bnl(B $Bnm(B $Bnn(B $Bno(B
+$Bnp(B $Bnq(B $Bnr(B $Bns(B $Bnt(B $Bnu(B $Bnv(B $Bnw(B $Bnx(B $Bny(B $Bnz(B $Bn{(B $Bn|(B $Bn}(B $Bn~(B
+ $Bo!(B $Bo"(B $Bo#(B $Bo$(B $Bo%(B $Bo&(B $Bo'(B $Bo((B $Bo)(B $Bo*(B $Bo+(B $Bo,(B $Bo-(B $Bo.(B $Bo/(B
+$Bo0(B $Bo1(B $Bo2(B $Bo3(B $Bo4(B $Bo5(B $Bo6(B $Bo7(B $Bo8(B $Bo9(B $Bo:(B $Bo;(B $Bo<(B $Bo=(B $Bo>(B $Bo?(B
+$Bo@(B $BoA(B $BoB(B $BoC(B $BoD(B $BoE(B $BoF(B $BoG(B $BoH(B $BoI(B $BoJ(B $BoK(B $BoL(B $BoM(B $BoN(B $BoO(B
+$BoP(B $BoQ(B $BoR(B $BoS(B $BoT(B $BoU(B $BoV(B $BoW(B $BoX(B $BoY(B $BoZ(B $Bo[(B $Bo\(B $Bo](B $Bo^(B $Bo_(B
+$Bo`(B $Boa(B $Bob(B $Boc(B $Bod(B $Boe(B $Bof(B $Bog(B $Boh(B $Boi(B $Boj(B $Bok(B $Bol(B $Bom(B $Bon(B $Boo(B
+$Bop(B $Boq(B $Bor(B $Bos(B $Bot(B $Bou(B $Bov(B $Bow(B $Box(B $Boy(B $Boz(B $Bo{(B $Bo|(B $Bo}(B $Bo~(B
+ $Bp!(B $Bp"(B $Bp#(B $Bp$(B $Bp%(B $Bp&(B $Bp'(B $Bp((B $Bp)(B $Bp*(B $Bp+(B $Bp,(B $Bp-(B $Bp.(B $Bp/(B
+$Bp0(B $Bp1(B $Bp2(B $Bp3(B $Bp4(B $Bp5(B $Bp6(B $Bp7(B $Bp8(B $Bp9(B $Bp:(B $Bp;(B $Bp<(B $Bp=(B $Bp>(B $Bp?(B
+$Bp@(B $BpA(B $BpB(B $BpC(B $BpD(B $BpE(B $BpF(B $BpG(B $BpH(B $BpI(B $BpJ(B $BpK(B $BpL(B $BpM(B $BpN(B $BpO(B
+$BpP(B $BpQ(B $BpR(B $BpS(B $BpT(B $BpU(B $BpV(B $BpW(B $BpX(B $BpY(B $BpZ(B $Bp[(B $Bp\(B $Bp](B $Bp^(B $Bp_(B
+$Bp`(B $Bpa(B $Bpb(B $Bpc(B $Bpd(B $Bpe(B $Bpf(B $Bpg(B $Bph(B $Bpi(B $Bpj(B $Bpk(B $Bpl(B $Bpm(B $Bpn(B $Bpo(B
+$Bpp(B $Bpq(B $Bpr(B $Bps(B $Bpt(B $Bpu(B $Bpv(B $Bpw(B $Bpx(B $Bpy(B $Bpz(B $Bp{(B $Bp|(B $Bp}(B $Bp~(B
+ $Bq!(B $Bq"(B $Bq#(B $Bq$(B $Bq%(B $Bq&(B $Bq'(B $Bq((B $Bq)(B $Bq*(B $Bq+(B $Bq,(B $Bq-(B $Bq.(B $Bq/(B
+$Bq0(B $Bq1(B $Bq2(B $Bq3(B $Bq4(B $Bq5(B $Bq6(B $Bq7(B $Bq8(B $Bq9(B $Bq:(B $Bq;(B $Bq<(B $Bq=(B $Bq>(B $Bq?(B
+$Bq@(B $BqA(B $BqB(B $BqC(B $BqD(B $BqE(B $BqF(B $BqG(B $BqH(B $BqI(B $BqJ(B $BqK(B $BqL(B $BqM(B $BqN(B $BqO(B
+$BqP(B $BqQ(B $BqR(B $BqS(B $BqT(B $BqU(B $BqV(B $BqW(B $BqX(B $BqY(B $BqZ(B $Bq[(B $Bq\(B $Bq](B $Bq^(B $Bq_(B
+$Bq`(B $Bqa(B $Bqb(B $Bqc(B $Bqd(B $Bqe(B $Bqf(B $Bqg(B $Bqh(B $Bqi(B $Bqj(B $Bqk(B $Bql(B $Bqm(B $Bqn(B $Bqo(B
+$Bqp(B $Bqq(B $Bqr(B $Bqs(B $Bqt(B $Bqu(B $Bqv(B $Bqw(B $Bqx(B $Bqy(B $Bqz(B $Bq{(B $Bq|(B $Bq}(B $Bq~(B
+ $Br!(B $Br"(B $Br#(B $Br$(B $Br%(B $Br&(B $Br'(B $Br((B $Br)(B $Br*(B $Br+(B $Br,(B $Br-(B $Br.(B $Br/(B
+$Br0(B $Br1(B $Br2(B $Br3(B $Br4(B $Br5(B $Br6(B $Br7(B $Br8(B $Br9(B $Br:(B $Br;(B $Br<(B $Br=(B $Br>(B $Br?(B
+$Br@(B $BrA(B $BrB(B $BrC(B $BrD(B $BrE(B $BrF(B $BrG(B $BrH(B $BrI(B $BrJ(B $BrK(B $BrL(B $BrM(B $BrN(B $BrO(B
+$BrP(B $BrQ(B $BrR(B $BrS(B $BrT(B $BrU(B $BrV(B $BrW(B $BrX(B $BrY(B $BrZ(B $Br[(B $Br\(B $Br](B $Br^(B $Br_(B
+$Br`(B $Bra(B $Brb(B $Brc(B $Brd(B $Bre(B $Brf(B $Brg(B $Brh(B $Bri(B $Brj(B $Brk(B $Brl(B $Brm(B $Brn(B $Bro(B
+$Brp(B $Brq(B $Brr(B $Brs(B $Brt(B $Bru(B $Brv(B $Brw(B $Brx(B $Bry(B $Brz(B $Br{(B $Br|(B $Br}(B $Br~(B
+ $Bs!(B $Bs"(B $Bs#(B $Bs$(B $Bs%(B $Bs&(B $Bs'(B $Bs((B $Bs)(B $Bs*(B $Bs+(B $Bs,(B $Bs-(B $Bs.(B $Bs/(B
+$Bs0(B $Bs1(B $Bs2(B $Bs3(B $Bs4(B $Bs5(B $Bs6(B $Bs7(B $Bs8(B $Bs9(B $Bs:(B $Bs;(B $Bs<(B $Bs=(B $Bs>(B $Bs?(B
+$Bs@(B $BsA(B $BsB(B $BsC(B $BsD(B $BsE(B $BsF(B $BsG(B $BsH(B $BsI(B $BsJ(B $BsK(B $BsL(B $BsM(B $BsN(B $BsO(B
+$BsP(B $BsQ(B $BsR(B $BsS(B $BsT(B $BsU(B $BsV(B $BsW(B $BsX(B $BsY(B $BsZ(B $Bs[(B $Bs\(B $Bs](B $Bs^(B $Bs_(B
+$Bs`(B $Bsa(B $Bsb(B $Bsc(B $Bsd(B $Bse(B $Bsf(B $Bsg(B $Bsh(B $Bsi(B $Bsj(B $Bsk(B $Bsl(B $Bsm(B $Bsn(B $Bso(B
+$Bsp(B $Bsq(B $Bsr(B $Bss(B $Bst(B $Bsu(B $Bsv(B $Bsw(B $Bsx(B $Bsy(B $Bsz(B $Bs{(B $Bs|(B $Bs}(B $Bs~(B
+ $Bt!(B $Bt"(B $Bt#(B $Bt$(B $Bt%(B $Bt&(B
+
+JIS0123 ($BF|K\8l(B) $B$3$s$K$A$O(B
+ JIS -- $B855$(B $B3+H/(B
+ $B/export/Users/ianl/1.4.2/test/sun/nio/cs/SCCS/s.ISO2022JP.data0%G!<%?%Y!<%9$KAw$k$Y$-$G$J$$$3$H$KCmL\$7$F$/$@$5$$!#(B</p>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/ISO8859x.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6419791
+ * @summary
+ * @author Martin Buchholz
+ */
+
+import java.io.*;
+import java.util.*;
+import java.nio.charset.*;
+import java.nio.*;
+
+public class ISO8859x {
+ final static byte[] lowBytes = new byte[0xa0];
+ final static char[] lowChars = new char[0xa0];
+ final static String lowString;
+ static {
+ for (int i = 0; i < 0xa0; i++) {
+ lowBytes[i] = (byte) i;
+ lowChars[i] = (char) i;
+ }
+ lowString = new String(lowChars);
+ }
+
+ private static void testCharset(Charset cs) throws Throwable {
+ String csn = cs.name();
+ System.out.println(csn);
+
+ check(cs.canEncode());
+ check(Arrays.equals(lowString.getBytes(csn), lowBytes));
+ check(new String(lowBytes, csn).equals(lowString));
+
+ CharsetEncoder encoder = cs.newEncoder();
+ CharsetDecoder decoder = cs.newDecoder();
+ decoder.onUnmappableCharacter(CodingErrorAction.REPORT)
+ .onMalformedInput(CodingErrorAction.REPORT);
+ encoder.onUnmappableCharacter(CodingErrorAction.REPORT)
+ .onMalformedInput(CodingErrorAction.REPORT);
+
+ byte[] bytes = new byte[1];
+ for (int c = 0xa0; c < 0x100; c++) {
+ try {
+ bytes[0] = (byte) c;
+ char[] chars;
+ try { chars = decoder.decode(ByteBuffer.wrap(bytes)).array(); }
+ catch (UnmappableCharacterException x) { continue; }
+ equal(chars.length, 1);
+ byte[] bytes2 = encoder.encode(CharBuffer.wrap(chars)).array();
+ check(Arrays.equals(bytes2, bytes));
+ } catch (Throwable t) {
+ System.out.printf("cs=%s c=%02x%n", cs, c);
+ unexpected(t);
+ }
+ }
+ }
+
+ private static void realMain(String[] args) throws Throwable {
+ for (Map.Entry<String,Charset> e
+ : Charset.availableCharsets().entrySet()) {
+ String csn = e.getKey();
+ Charset cs = e.getValue();
+ if (csn.matches(".*(8859).*"))
+ try { testCharset(cs); }
+ catch (Throwable t) { unexpected(t); }
+ }
+ }
+
+ //--------------------- Infrastructure ---------------------------
+ static volatile int passed = 0, failed = 0;
+ static void pass() {passed++;}
+ static void fail() {failed++; Thread.dumpStack();}
+ static void fail(String msg) {System.out.println(msg); fail();}
+ static void unexpected(Throwable t) {failed++; t.printStackTrace();}
+ static void check(boolean cond) {if (cond) pass(); else fail();}
+ static void equal(Object x, Object y) {
+ if (x == null ? y == null : x.equals(y)) pass();
+ else fail(x + " not equal to " + y);}
+ public static void main(String[] args) throws Throwable {
+ try {realMain(args);} catch (Throwable t) {unexpected(t);}
+ System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+ if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/JISAutoDetectTest.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4087261 4184592
+ * @summary Make sure to determine Japanese text encoding as correctly
+ * as possible.
+ */
+
+import java.nio.charset.*;
+import java.nio.*;
+
+public class JISAutoDetectTest {
+
+ class TestData {
+ byte[] input;
+ byte[] input2; // for second call
+ String expectedCharset;
+ }
+ TestData[] data = new TestData[50];
+
+ public static void main(String[] argv) throws Exception {
+ JISAutoDetectTest test = new JISAutoDetectTest();
+ test.execute();
+ }
+
+ void execute() throws Exception {
+ CharBuffer output = CharBuffer.allocate(128);
+ CharBuffer expectedOutput = CharBuffer.allocate(128);
+
+ for (int i = 0; i < data.length; i++) {
+ if (data[i] == null)
+ break;
+
+ CharsetDecoder autoDetect = Charset.forName("JISAutoDetect").newDecoder();
+ CharsetDecoder dec = Charset.forName(data[i].expectedCharset).newDecoder();
+ CoderResult ncr, mcr;
+ output.clear();
+ expectedOutput.clear();
+ ncr = autoDetect.decode(ByteBuffer.wrap(data[i].input),
+ output,
+ true);
+ mcr = dec.decode(ByteBuffer.wrap(data[i].input),
+ expectedOutput,
+ true);
+
+ if (data[i].input2 != null) {
+ ncr = autoDetect.decode(ByteBuffer.wrap(data[i].input2),
+ output,
+ true);
+ mcr = dec.decode(ByteBuffer.wrap(data[i].input2),
+ expectedOutput,
+ true);
+ }
+ String testNumber = " (test#: " + i + ")";
+ if (ncr != mcr)
+ throw new Exception("JISAutoDetect returned a wrong result");
+ output.flip();
+ expectedOutput.flip();
+ if (output.limit() != expectedOutput.limit())
+ throw new Exception("JISAutoDetect returned a wrong length"+testNumber);
+
+ for (int x = 0; x < output.limit(); x++) {
+ if (expectedOutput.charAt(x) != output.charAt(x))
+ throw new Exception("JISAutoDetect returned a wrong string"+testNumber);
+ }
+ }
+ }
+
+ public JISAutoDetectTest() {
+ int i = 0;
+
+ // 0
+ data[i] = new TestData();
+ data[i].input = new byte[] { (byte)'C', (byte)'o', (byte)'p', (byte)'y',
+ (byte)'r', (byte)'i', (byte)'g', (byte)'h',
+ (byte)'t', (byte)' ', (byte)0xa9, (byte)' ',
+ (byte)'1', (byte)'9', (byte)'9', (byte)'8' };
+ data[i].expectedCharset = "SJIS";
+
+ // 1
+ i++;
+ data[i] = new TestData();
+ data[i].input = new byte[] { (byte)0xbb, (byte)0xdd, (byte)0xcf, (byte)0xb2,
+ (byte)0xb8, (byte)0xdb, (byte)0xbc, (byte)0xbd,
+ (byte)0xc3, (byte)0xd1, (byte)0xbd, (byte)0xde,
+ (byte)0x82, (byte)0xc5, (byte)0x82, (byte)0xb7 };
+ data[i].expectedCharset = "SJIS";
+
+ // 2
+ i++;
+ data[i] = new TestData();
+ data[i].input = new byte[] { (byte)0xbb, (byte)0xdd, (byte)0xcf, (byte)0xb2,
+ (byte)0xb8, (byte)0xdb, (byte)0xbc, (byte)0xbd,
+ (byte)0xc3, (byte)0xd1, (byte)0xbd, (byte)0xde};
+ data[i].expectedCharset = "SJIS";
+
+ // 3
+ i++;
+ data[i] = new TestData();
+ data[i].input = new byte[] { (byte)0xbb, (byte)0xdd, (byte)0xcf, (byte)0xb2,
+ (byte)0xb8, (byte)0xdb, (byte)0xbc, (byte)0xbd,
+ (byte)0xc3, (byte)0xd1, (byte)0xbd };
+ data[i].expectedCharset = "SJIS";
+
+ // 4
+ i++;
+ data[i] = new TestData();
+ data[i].input = new byte[] { (byte)0x8f, (byte)0xa1, (byte)0xaa };
+ data[i].expectedCharset = "SJIS";
+
+ // 5
+ i++;
+ data[i] = new TestData();
+ data[i].input = new byte[] { (byte)0xa4, (byte)0xd2, (byte)0xa4, (byte)0xe9,
+ (byte)0xa4, (byte)0xac, (byte)0xa4, (byte)0xca };
+ data[i].expectedCharset = "EUC_JP";
+
+ // 6
+ i++;
+ data[i] = new TestData();
+ data[i].input = new byte[] { (byte)0xbb, (byte)0xdd, (byte)0xcf, (byte)0xb2,
+ (byte)0xb8, (byte)0xdb, (byte)0xbc, (byte)0xbd,
+ (byte)0xc3, (byte)0xd1, (byte)0xbd, (byte)0xde,
+ (byte)0xa4, (byte)0xc7, (byte)0xa4, (byte)0xb9 };
+ data[i].expectedCharset = "EUC_JP";
+
+ // 7 (for 4184592)
+ i++;
+ data[i] = new TestData();
+ data[i].input = new byte[] { (byte)'a', (byte)'b', (byte)'c' };
+ data[i].input2 = new byte[] { (byte)0x1b, (byte)'$', (byte)'B',
+ (byte)'#', (byte)'4', (byte)'$', (byte)'5',
+ (byte)0x1b, (byte)'(', (byte)'B' };
+ data[i].expectedCharset = "ISO2022JP";
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/LatinCharReplacementTWTest.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4658679 4879644
+ @summary Checks replacement logic within EUC-TW decoder
+*/
+
+/*
+ * Tests goodness of fix for bugID 4658679: EUC-TW decoder should
+ * perform replacement when it encounters latin chars outside the
+ * normal US-ASCII range. For example: Isolated occurrences of
+ * French accented chars. See bugID: 4658679.
+ */
+import java.io.*;
+public class LatinCharReplacementTWTest {
+ public static void main(String[] args) throws Exception {
+ final String bugID = "4658679";
+ // Attempt to decode
+ byte[] input = { (byte)0xa1,
+ (byte)0xf0,
+ (byte)'r',
+ (byte)'e',
+ (byte)'s',
+ (byte)0xe9, // illegal within EUC-TW
+ (byte)'r',
+ (byte)'v',
+ (byte)0xe9, // illegal within EUC-TW
+ (byte)'s',
+ (byte)0xa2,
+ (byte)0xf8
+ };
+
+ char[] expected = { (char) 0xa7,
+ (char) 'r',
+ (char) 'e',
+ (char) 's',
+ (char) 0xFFFD, // replacement for accented lowercase e
+ (char) 'r',
+ (char) 'v',
+ (char) 0xFFFD, // replacement for accented lowercase e
+ (char) 's',
+ (char) 0xb0 };
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(input);
+ InputStreamReader isr = new InputStreamReader(bais, "x-EUC-TW");
+
+ char[] decoded = new char[128];
+ int numChars = isr.read(decoded);
+
+ if (numChars != expected.length) {
+ throw new Exception("failure of test for bug " + bugID);
+ }
+
+ for (int i = 0 ; i < numChars; i++) {
+ if (decoded[i] != expected[i])
+ throw new Exception("failure of test for bug " + bugID);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/LeftOverSurrogate.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4160949
+ @summary Verify that left over high surrogate does not
+ cause an UnknownCharacterException when substitutition mode is turned on.
+ */
+
+import java.nio.*;
+import java.nio.charset.*;
+
+public class LeftOverSurrogate {
+
+ public static void main(String args[]) throws Exception {
+ String s = "abc\uD800\uDC00qrst"; // Valid surrogate
+ char[] c = s.toCharArray();
+ CharsetEncoder enc = Charset.forName("ISO8859_1").newEncoder()
+ .onUnmappableCharacter(CodingErrorAction.REPLACE);
+ /* Process the first 4 characters, including the high surrogate
+ which should be stored */
+ ByteBuffer bb = ByteBuffer.allocate(10);
+ CharBuffer cb = CharBuffer.wrap(c);
+ cb.limit(4);
+ enc.encode(cb, bb, false);
+ cb.limit(7);
+ enc.encode(cb, bb, true);
+ byte[] first = bb.array();
+ for(int i = 0; i < 7; i++)
+ System.err.printf("[%d]=%d was %d\n",
+ i,
+ (int) first[i] &0xffff,
+ (int) c[i] & 0xffff);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/MalformedSurrogates.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4153987
+ @summary Malformed surrogates should be handled by the converter in
+ substitution mode.
+ */
+
+import java.io.*;
+
+public class MalformedSurrogates {
+
+ public static void main(String[] args) throws Exception {
+
+ String fe = System.getProperty("file.encoding");
+ if ( fe.equalsIgnoreCase("UTF8")
+ || fe.equalsIgnoreCase("UTF-8")
+ || fe.equalsIgnoreCase("UTF_8"))
+ // This test is meaningless if the default charset
+ // does handle surrogates
+ return;
+
+ System.out.println("Testing string conversion...");
+ /* Example with malformed surrogate, and an offset */
+ String t = "abc\uD800\uDB00efgh";
+ String t2 = t.substring(2);
+ byte[] b = t2.getBytes();
+ System.err.println(b.length);
+ for (int i = 0; i < b.length; i++)
+ System.err.println("[" + i + "]" + "=" + (char) b[i]
+ + "=" + (int) b[i]);
+ if (b.length != 7) {
+ throw new Exception("Bad string conversion for bad surrogate");
+ }
+
+ /* Example with a proper surrogate, no offset. Always worked */
+ String t3 = "abc\uD800\uDC00efgh";
+ byte[] b2 = t3.getBytes();
+ System.out.println(b2.length);
+ for(int i = 0; i < b2.length; i++)
+ System.err.println("[" + i + "]" + "=" + (char) b2[i]);
+ if (b2.length != 8) {
+ throw new Exception("Bad string conversion for good surrogate");
+ }
+
+ OutputStream os = new ByteArrayOutputStream();
+ OutputStreamWriter osw = new OutputStreamWriter(os);
+ System.out.println("Testing flush....");
+ /* Check for the case where the converter has a left over
+ high surrogate when flush is called on the converter */
+ osw.flush();
+ String s = "abc\uD800"; // High surrogate
+ char[] c = s.toCharArray();
+ osw.write(s, 0, 4);
+ osw.flush();
+
+ System.out.println("Testing convert...");
+ /* Verify that all other characters go through */
+ for (int k = 1; k < 65535 ; k++) {
+ osw.write("Char[" + k + "]=\"" + ((char) k) + "\"");
+ }
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/NIOJISAutoDetectTest.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,282 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4831163 5053096 5056440
+ * @summary NIO charset basic verification of JISAutodetect decoder
+ * @author Martin Buchholz
+ */
+
+import java.io.*;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CoderResult;
+import static java.lang.System.*;
+
+public class NIOJISAutoDetectTest {
+ private static int failures = 0;
+
+ private static void fail(String failureMsg) {
+ System.out.println(failureMsg);
+ failures++;
+ }
+
+ private static void check(boolean cond, String msg) {
+ if (!cond) {
+ fail("test failed: " + msg);
+ new Exception().printStackTrace();
+ }
+ }
+
+ private static String SJISName() throws Exception {
+ return detectingCharset(new byte[] {(byte)0xbb, (byte)0xdd,
+ (byte)0xcf, (byte)0xb2});
+ }
+
+ private static String EUCJName() throws Exception {
+ return detectingCharset(new byte[] {(byte)0xa4, (byte)0xd2,
+ (byte)0xa4, (byte)0xe9});
+ }
+
+ private static String detectingCharset(byte[] bytes) throws Exception {
+ //----------------------------------------------------------------
+ // Test special public methods of CharsetDecoder while we're here
+ //----------------------------------------------------------------
+ CharsetDecoder cd = Charset.forName("JISAutodetect").newDecoder();
+ check(cd.isAutoDetecting(), "isAutodecting()");
+ check(! cd.isCharsetDetected(), "isCharsetDetected");
+ cd.decode(ByteBuffer.wrap(new byte[] {(byte)'A'}));
+ check(! cd.isCharsetDetected(), "isCharsetDetected");
+ try {
+ cd.detectedCharset();
+ fail("no IllegalStateException");
+ } catch (IllegalStateException e) {}
+ cd.decode(ByteBuffer.wrap(bytes));
+ check(cd.isCharsetDetected(), "isCharsetDetected");
+ Charset cs = cd.detectedCharset();
+ check(cs != null, "cs != null");
+ check(! cs.newDecoder().isAutoDetecting(), "isAutodetecting()");
+ return cs.name();
+ }
+
+ public static void main(String[] argv) throws Exception {
+ //----------------------------------------------------------------
+ // Used to throw BufferOverflowException
+ //----------------------------------------------------------------
+ out.println(new String(new byte[] {0x61}, "JISAutoDetect"));
+
+ //----------------------------------------------------------------
+ // InputStreamReader(...JISAutoDetect) used to infloop
+ //----------------------------------------------------------------
+ {
+ byte[] bytes = "ABCD\n".getBytes();
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+ InputStreamReader isr = new InputStreamReader(bais, "JISAutoDetect");
+ BufferedReader reader = new BufferedReader(isr);
+ check (reader.readLine().equals("ABCD"), "first read gets text");
+ // used to return "ABCD" on second and subsequent reads
+ check (reader.readLine() == null, "second read gets null");
+ }
+
+ //----------------------------------------------------------------
+ // Check all Japanese chars for sanity
+ //----------------------------------------------------------------
+ String SJIS = SJISName();
+ String EUCJ = EUCJName();
+ out.printf("SJIS charset is %s%n", SJIS);
+ out.printf("EUCJ charset is %s%n", EUCJ);
+
+ int cnt2022 = 0;
+ int cnteucj = 0;
+ int cntsjis = 0;
+ int cntBAD = 0;
+ for (char c = '\u0000'; c < '\uffff'; c++) {
+ if (c == '\u001b' || // ESC
+ c == '\u2014') // Em-Dash?
+ continue;
+ String s = new String (new char[] {c});
+
+ //----------------------------------------------------------------
+ // JISAutoDetect can handle all chars that EUC-JP can,
+ // unless there is an ambiguity with SJIS.
+ //----------------------------------------------------------------
+ byte[] beucj = s.getBytes(EUCJ);
+ String seucj = new String(beucj, EUCJ);
+ if (seucj.equals(s)) {
+ cnteucj++;
+ String sauto = new String(beucj, "JISAutoDetect");
+
+ if (! sauto.equals(seucj)) {
+ cntBAD++;
+ String ssjis = new String(beucj, SJIS);
+ if (! sauto.equals(ssjis)) {
+ fail("Autodetection agrees with neither EUC nor SJIS");
+ }
+ }
+ } else
+ continue; // Optimization
+
+ //----------------------------------------------------------------
+ // JISAutoDetect can handle all chars that ISO-2022-JP can.
+ //----------------------------------------------------------------
+ byte[] b2022 = s.getBytes("ISO-2022-JP");
+ if (new String(b2022, "ISO-2022-JP").equals(s)) {
+ cnt2022++;
+ check(new String(b2022,"JISAutoDetect").equals(s),
+ "ISO2022 autodetection");
+ }
+
+ //----------------------------------------------------------------
+ // JISAutoDetect can handle almost all chars that SJIS can.
+ //----------------------------------------------------------------
+ byte[] bsjis = s.getBytes(SJIS);
+ if (new String(bsjis, SJIS).equals(s)) {
+ cntsjis++;
+ check(new String(bsjis,"JISAutoDetect").equals(s),
+ "SJIS autodetection");
+ }
+ }
+ out.printf("There are %d ISO-2022-JP-encodable characters.%n", cnt2022);
+ out.printf("There are %d SJIS-encodable characters.%n", cntsjis);
+ out.printf("There are %d EUC-JP-encodable characters.%n", cnteucj);
+ out.printf("There are %d characters that are " +
+ "misdetected as SJIS after being EUC-encoded.%n", cntBAD);
+
+
+ //----------------------------------------------------------------
+ // tests for specific byte sequences
+ //----------------------------------------------------------------
+ test("ISO-2022-JP", new byte[] {'A', 'B', 'C'});
+ test("EUC-JP", new byte[] {'A', 'B', 'C'});
+ test("SJIS", new byte[] {'A', 'B', 'C'});
+
+ test("SJIS",
+ new byte[] { 'C', 'o', 'p', 'y', 'r', 'i', 'g', 'h', 't',
+ ' ', (byte)0xa9, ' ', '1', '9', '9', '8' });
+
+ test("SJIS",
+ new byte[] { (byte)0xbb, (byte)0xdd, (byte)0xcf, (byte)0xb2,
+ (byte)0xb8, (byte)0xdb, (byte)0xbc, (byte)0xbd,
+ (byte)0xc3, (byte)0xd1, (byte)0xbd, (byte)0xde,
+ (byte)0x82, (byte)0xc5, (byte)0x82, (byte)0xb7 });
+
+ test("EUC-JP",
+ new byte[] { (byte)0xa4, (byte)0xd2, (byte)0xa4, (byte)0xe9,
+ (byte)0xa4, (byte)0xac, (byte)0xa4, (byte)0xca });
+
+ test("SJIS",
+ new byte[] { (byte)0xbb, (byte)0xdd, (byte)0xcf, (byte)0xb2,
+ (byte)0xb8, (byte)0xdb, (byte)0xbc, (byte)0xbd,
+ (byte)0xc3, (byte)0xd1, (byte)0xbd, (byte)0xde});
+
+ test("SJIS",
+ new byte[] { (byte)0xbb, (byte)0xdd, (byte)0xcf, (byte)0xb2,
+ (byte)0xb8, (byte)0xdb, (byte)0xbc, (byte)0xbd,
+ (byte)0xc3, (byte)0xd1, (byte)0xbd });
+
+ test("SJIS",
+ new byte[] { (byte)0x8f, (byte)0xa1, (byte)0xaa });
+
+ test("EUC-JP",
+ new byte[] { (byte)0x8f, (byte)0xc5, (byte)0xe0, (byte)0x20});
+
+ test("EUC-JP",
+ new byte[] { (byte)0xbb, (byte)0xdd, (byte)0xcf, (byte)0xb2,
+ (byte)0xb8, (byte)0xdb, (byte)0xbc, (byte)0xbd,
+ (byte)0xc3, (byte)0xd1, (byte)0xbd, (byte)0xde,
+ (byte)0xa4, (byte)0xc7, (byte)0xa4, (byte)0xb9 });
+
+ test("ISO-2022-JP",
+ new byte[] { 0x1b, '$', 'B', '#', '4', '$', '5', 0x1b, '(', 'B' });
+
+
+ //----------------------------------------------------------------
+ // Check handling of ambiguous end-of-input in middle of first char
+ //----------------------------------------------------------------
+ {
+ CharsetDecoder dc = Charset.forName("x-JISAutoDetect").newDecoder();
+ ByteBuffer bb = ByteBuffer.allocate(128);
+ CharBuffer cb = CharBuffer.allocate(128);
+ bb.put((byte)'A').put((byte)0x8f);
+ bb.flip();
+ CoderResult res = dc.decode(bb,cb,false);
+ check(res.isUnderflow(), "isUnderflow");
+ check(bb.position() == 1, "bb.position()");
+ check(cb.position() == 1, "cb.position()");
+ res = dc.decode(bb,cb,false);
+ check(res.isUnderflow(), "isUnderflow");
+ check(bb.position() == 1, "bb.position()");
+ check(cb.position() == 1, "cb.position()");
+ bb.compact();
+ bb.put((byte)0xa1);
+ bb.flip();
+ res = dc.decode(bb,cb,true);
+ check(res.isUnderflow(), "isUnderflow");
+ check(bb.position() == 2, "bb.position()");
+ check(cb.position() == 2, "cb.position()");
+ }
+
+
+ if (failures > 0)
+ throw new RuntimeException(failures + " tests failed");
+ }
+
+ static void checkCoderResult(CoderResult result) {
+ check(result.isUnderflow(),
+ "Unexpected coder result: " + result);
+ }
+
+ static void test(String expectedCharset, byte[] input) throws Exception {
+ Charset cs = Charset.forName("x-JISAutoDetect");
+ CharsetDecoder autoDetect = cs.newDecoder();
+
+ Charset cs2 = Charset.forName(expectedCharset);
+ CharsetDecoder decoder = cs2.newDecoder();
+
+ ByteBuffer bb = ByteBuffer.allocate(128);
+ CharBuffer charOutput = CharBuffer.allocate(128);
+ CharBuffer charExpected = CharBuffer.allocate(128);
+
+ bb.put(input);
+ bb.flip();
+ bb.mark();
+
+ CoderResult result = autoDetect.decode(bb, charOutput, true);
+ checkCoderResult(result);
+ charOutput.flip();
+ String actual = charOutput.toString();
+
+ bb.reset();
+
+ result = decoder.decode(bb, charExpected, true);
+ checkCoderResult(result);
+ charExpected.flip();
+ String expected = charExpected.toString();
+
+ check(actual.equals(expected),
+ String.format("actual=%s expected=%s", actual, expected));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/ReadZero.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @summary Verify that if InputStream.read returns 0 we throw an exception.
+ * @bug 4684515
+ */
+
+import java.io.*;
+
+public class ReadZero {
+
+ public static void main(String [] args) throws IOException {
+ ReadZero r = new ReadZero();
+ r.testInputStream();
+ }
+
+ private void testInputStream() throws IOException {
+ File f = new File(System.getProperty("test.src", "."), "ReadZero.java");
+ InputStream is = new FileInputStream(f) {
+ public int read(byte [] b, int off, int len) {
+ System.out.println("FileInputStream.read");
+ return 0;
+ }
+ };
+
+ is.read(new byte[1], 0, 1); // ok
+ InputStreamReader isr = new InputStreamReader(is);
+
+ try {
+ int res = isr.read(new char[1], 0, 1);
+ } catch (IOException x) {
+ System.out.println("IOException caught");
+ return;
+ }
+ throw new RuntimeException("IOException not thrown");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/SJISCanEncode.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4913702
+ @summary validates canEncode(char c) method for sun.nio.cs.Shift_JIS
+ */
+
+
+import java.nio.*;
+import java.nio.charset.*;
+
+public class SJISCanEncode {
+ private Charset cs;
+ private CharsetEncoder encoder;
+
+ private void canEncodeTest(char inputChar,
+ boolean expectedResult)
+ throws Exception {
+ String msg = "err: Shift_JIS canEncode() return value ";
+
+ if (encoder.canEncode(inputChar) != expectedResult) {
+ throw new Exception(msg + !(expectedResult) +
+ ": " + Integer.toHexString((int)inputChar));
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ SJISCanEncode test = new SJISCanEncode();
+ test.cs = Charset.forName("SJIS");
+ test.encoder = test.cs.newEncoder();
+
+ // us-ascii (mappable by Shift_JIS)
+ test.canEncodeTest('\u0001', true);
+
+ // Halfwidth Katakana
+ test.canEncodeTest('\uFF01', true);
+
+ // CJK ideograph
+ test.canEncodeTest('\u4E9C', true);
+
+ //Hiragana
+ test.canEncodeTest('\u3041', true);
+ // fullwidth Katakana
+ test.canEncodeTest('\u30A1', true);
+
+ // U+0080 should be unmappable
+ // U+4000 is a BMP character not covered by Shift_JISe
+
+ test.canEncodeTest('\u0080', false);
+ test.canEncodeTest('\u4000', false);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/StreamEncoderClose.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 5005426
+ @summary Check if StreamEncoder close() method works correctly from
+ error recovery after the underneath OutputStream failed to
+ close the first time.
+ */
+
+import java.io.*;
+public class StreamEncoderClose {
+ public static void main( String arg[] ) throws Exception {
+ byte[] expected = {(byte)0x1b,(byte)0x24,(byte)0x42,
+ (byte)0x30,(byte)0x6c,
+ (byte)0x1b,(byte)0x28,(byte)0x42};
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ MyBufferedOutputStream mbos = new MyBufferedOutputStream(baos);
+ PrintWriter pw = new PrintWriter(new OutputStreamWriter(mbos, "ISO-2022-JP"));
+ mbos.dontClose();
+ pw.write("\u4e00");
+ pw.close(); // 1st PrintWriter Close
+ mbos.canClose();
+ pw.close(); // 2nd PrintWriter Close
+
+ //double check, probably not necessary
+ byte[] out = baos.toByteArray();
+ if (out.length != expected.length) {
+ throw new IOException("Failed");
+ }
+ for (int i = 0; i < out.length; i++) {
+ //System.out.printf("(byte)0x%x,", out[i] & 0xff);
+ if (out[i] != expected[i])
+ throw new IOException("Failed");
+ }
+ }
+
+ static class MyBufferedOutputStream extends BufferedOutputStream {
+ MyBufferedOutputStream(OutputStream os) {
+ super(os);
+ }
+ private boolean status;
+ public void dontClose() {
+ status = false;
+ }
+ public void canClose() {
+ status = true;
+ }
+ public void close() throws IOException {
+ if ( status == false ) {
+ throw new IOException("Can't close ");
+ }
+ super.close();
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/SurrogateGB18030Test.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4896454
+ @summary Check GB18030 surrogate encoding/decoding handling
+ */
+
+import java.nio.*;
+import java.nio.charset.*;
+
+public class SurrogateGB18030Test {
+ public static void main(String[] args) throws Exception {
+ SurrogateGB18030Test test = new SurrogateGB18030Test();
+
+ test.roundtripTest();
+
+ /**
+ * Valid Surrogate pair and 4 byte GB18030 representation
+ */
+
+ String inputString = "\uD800\uDC00";
+
+ byte[] expectedBytes = { (byte)0x90,
+ (byte)0x30,
+ (byte)0x81,
+ (byte)0x30
+ };
+ test.encodeTest(inputString, expectedBytes);
+
+ /**
+ * Vice-versa : check that 4 byte GB18030 value encodes correctly
+ */
+
+ String expectedStr = "\uDBFF\uDFFF";
+
+ byte[] inputBytes = { (byte)0xe3,
+ (byte)0x32,
+ (byte)0x9a,
+ (byte)0x35
+ };
+
+
+ test.decodeTest(inputBytes, expectedStr);
+
+ }
+
+ private void roundtripTest() throws Exception
+ {
+ byte[] ba;
+ char[] pair = new char[2];
+ for (char high = '\ud800'; high <= '\udbff'; high++) {
+ for (char low = '\udc00'; low <= '\udfff'; low++) {
+ pair[0] = high;
+ pair[1] = low;
+ String s = new String(pair);
+ if (!s.equals(new String(s.getBytes("gb18030"), "gb18030")))
+ throw new Exception ("GB18030 roundtrip failure");
+ }
+ }
+
+ }
+
+ private void encodeTest(String inputString, byte[] expectedBytes)
+ throws Exception
+ {
+ byte[] encoded = inputString.getBytes("GB18030");
+
+ CharBuffer cb = CharBuffer.wrap(inputString.toCharArray());
+ ByteBuffer bb = ByteBuffer.allocate(4);
+
+ CharsetEncoder encoder = Charset.forName("GB18030").newEncoder();
+ encoder.encode(cb, bb, true);
+
+ bb.flip();
+ for (int i = 0 ; i < expectedBytes.length; i++) {
+ if (encoded[i] != expectedBytes[i]
+ || bb.get() != expectedBytes[i])
+ throw new Exception ("GB18030 encode failure");
+ }
+ }
+
+ private void decodeTest(byte[] inputBytes, String expectedStr)
+ throws Exception
+ {
+ String s2 = new String(inputBytes, "GB18030");
+
+ CharsetDecoder decoder = Charset.forName("GB18030").newDecoder();
+
+ ByteBuffer bb = ByteBuffer.wrap(inputBytes);
+ CharBuffer cb = CharBuffer.allocate(2);
+ decoder.decode(bb, cb, true);
+
+ cb.flip();
+ for (int i = 0 ; i < expectedStr.length(); i++) {
+ if (expectedStr.charAt(i) != cb.get()
+ || s2.charAt(i) != expectedStr.charAt(i))
+ throw new Exception ("GB18030 encode failure");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/SurrogateTestEUCTW.java Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4847097
+ @summary Check surrogate coverage of EUC_TW
+ */
+
+/*
+ * Tests the full surrogate mapping roundtrip fidelity of the
+ * EUC-TW charset coder updated to support the additional
+ * planes 4,5,6,7,15
+ *
+ * byte->char mappings are contained in external files
+ * using plane{x}.surrogate as the convention for the input filenames
+ *
+ */
+
+import java.io.*;
+public class SurrogateTestEUCTW {
+
+ private static final String testRootDir
+ = System.getProperty("test.src", ".");
+
+ public static void main(String[] args) throws Exception {
+ char[] surrogatePair = new char[2];
+ int[] expectBytes = new int[4];
+
+ // Iterate test over each supported CNS-11643 plane
+ // containing supplementary character mappings
+
+ String[] testPlane = { "3", "4", "5", "6" ,"7", "15" };
+
+ for (int i = 0 ; i < testPlane.length; i++) {
+ FileReader f = new FileReader(testRootDir +
+ System.getProperty("file.separator")
+ + "SurrogateTestEUCTW.plane"
+ + testPlane[i]
+ + ".surrogates");
+ BufferedReader r = new BufferedReader(f);
+ String line;
+
+ while ((line = r.readLine()) != null) {
+ int charValue = Integer.parseInt(line.substring(9,14), 16);
+ surrogatePair[0] = (char) ((charValue - 0x10000) / 0x400
+ + 0xd800);
+ surrogatePair[1] = (char) ((charValue - 0x10000) % 0x400
+ + 0xdc00);
+ // Synthesize 4 byte expected byte values from CNS input values
+ expectBytes[0] = 0x8E;
+ expectBytes[1] = 0xA0 + Integer.parseInt(testPlane[i]);
+ expectBytes[2] = 0x80 | Integer.parseInt(line.substring(2,4), 16);
+ expectBytes[3] = 0x80 | Integer.parseInt(line.substring(4,6), 16);
+
+ String testStr = new String(surrogatePair);
+ byte[] encodedBytes = testStr.getBytes("EUC-TW");
+
+ for (int x = 0 ; x < 4 ; x++) {
+ if (encodedBytes[x] != (byte)(expectBytes[x] & 0xff)) {
+ throw new Exception("EUC_TW Surrogate Encoder error");
+ }
+ }
+
+ // Next: test round-trip fidelity
+ String decoded = new String(encodedBytes, "EUC-TW");
+
+ if (!decoded.equals(testStr)) {
+ throw new Exception("EUCTW Decoder error");
+ }
+ }
+ r.close();
+ f.close();
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/SurrogateTestEUCTW.plane15.surrogates Wed Jul 09 10:04:09 2008 -0700
@@ -0,0 +1,6476 @@
+0x2121 0x20002
+0x2122 0x2008C
+0x2123 0x200D4
+0x2124 0x201A5
+0x2125 0x20092
+0x2126 0x20093
+0x2127 0x200D8
+0x2128 0x200D9
+0x2129 0x201A7
+0x212A 0x2062B
+0x212B 0x2062C
+0x212C 0x2062D
+0x212D 0x20630
+0x212E 0x2062E
+0x212F 0x206AB
+0x2131 0x2092D
+0x2132 0x2096D
+0x2133 0x2F834
+0x2134 0x20A0F
+0x2136 0x20B9D
+0x2137 0x211A2
+0x2138 0x215D4
+0x2139 0x21B56
+0x213A 0x21BC3
+0x213B 0x22014
+0x213D 0x2471A
+0x213E 0x2000F
+0x213F 0x20010
+0x2140 0x2009A
+0x2141 0x2009B
+0x2143 0x201AC
+0x2145 0x20097
+0x2146 0x20546
+0x2148 0x20576
+0x2149 0x20577
+0x214A 0x205AE
+0x214B 0x2063A
+0x214C 0x2067D
+0x214D 0x21BC5
+0x214E 0x20BA8
+0x2151 0x21241
+0x2152 0x21242
+0x2153 0x215D8
+0x2154 0x215D9
+0x2155 0x216AA
+0x2156 0x216AB
+0x2157 0x21942
+0x2158 0x21941
+0x215A 0x21BC6
+0x215C 0x21D35
+0x215D 0x21D36
+0x215E 0x21D37
+0x215F 0x2F883
+0x2160 0x2634D
+0x2162 0x221B5
+0x2163 0x22317
+0x2164 0x22482
+0x2165 0x233B6
+0x2167 0x23C72
+0x2168 0x2455C
+0x2169 0x245A8
+0x216B 0x215E3
+0x216E 0x200E6
+0x216F 0x20144
+0x2170 0x20145
+0x2173 0x201C4
+0x2174 0x201C5
+0x2175 0x201C6
+0x2176 0x201C7
+0x2177 0x201C8
+0x2178 0x201C9
+0x2179 0x201CA
+0x217A 0x201D4
+0x217B 0x2057D
+0x217C 0x26272
+0x217D 0x205B2
+0x217E 0x205B4
+0x2221 0x20682
+0x2222 0x206C7
+0x2223 0x206C8
+0x2225 0x2083C
+0x2226 0x2083D
+0x2227 0x2083E
+0x2228 0x2083F
+0x2229 0x2F824
+0x222A 0x208D3
+0x222B 0x20147
+0x222D 0x20A3D
+0x222E 0x20AE2
+0x222F 0x20BB8
+0x2230 0x20BB9
+0x2231 0x20BC2
+0x2232 0x20BBA
+0x2233 0x20BC6
+0x2234 0x20BBB
+0x2235 0x211AD
+0x2236 0x2124C
+0x2237 0x2124D
+0x2239 0x216B2
+0x223A 0x216B3
+0x223B 0x216B4
+0x223C 0x216B5
+0x223D 0x219C3
+0x223E 0x219C4
+0x223F 0x219C5
+0x2240 0x219C6
+0x2241 0x219C7
+0x2243 0x21BCE
+0x2244 0x21C30
+0x2245 0x21D47
+0x2246 0x21D48
+0x2248 0x2205C
+0x224A 0x2205F
+0x224B 0x22318
+0x224C 0x22319
+0x224D 0x2237E
+0x224F 0x225B0
+0x2250 0x22A75
+0x2252 0x22A76
+0x2253 0x23041
+0x2254 0x23142
+0x2256 0x233BD
+0x225A 0x23B1E
+0x225B 0x23B1F
+0x225C 0x23C87
+0x225E 0x23C78
+0x225F 0x24188
+0x2260 0x24189
+0x2261 0x2418A
+0x2262 0x24617
+0x2263 0x24615
+0x2267 0x250E5
+0x2268 0x25609
+0x2269 0x2573B
+0x226A 0x2574F
+0x226C 0x2662E
+0x226D 0x2662F
+0x226E 0x26AFF
+0x226F 0x26AFD
+0x2270 0x26AFE
+0x2274 0x20023
+0x2275 0x200EA
+0x2276 0x2012A
+0x2277 0x20149
+0x2278 0x2014A
+0x2279 0x2014B
+0x227A 0x201DF
+0x227B 0x201E0
+0x227C 0x201E1
+0x227D 0x201E2
+0x227E 0x205C1
+0x2321 0x201E3
+0x2322 0x201E4
+0x2323 0x201E5
+0x2324 0x205C0
+0x2325 0x201E6
+0x2326 0x201F7
+0x2328 0x201E7
+0x2329 0x201E8
+0x232A 0x201E9
+0x232B 0x201EA
+0x232C 0x201EB
+0x232D 0x2050E
+0x232E 0x20580
+0x232F 0x20581
+0x2330 0x205BA
+0x2331 0x205BB
+0x2332 0x205BC
+0x2333 0x205BD
+0x2334 0x2063F
+0x2335 0x20640
+0x2336 0x20688
+0x2337 0x2F81F
+0x2338 0x20846
+0x233A 0x20847
+0x233B 0x20848
+0x233C 0x20936
+0x233D 0x20972
+0x233E 0x20996
+0x233F 0x20A47
+0x2340 0x20AE7
+0x2341 0x20B34
+0x2342 0x20B35
+0x2343 0x20B36
+0x2344 0x20B37
+0x2345 0x20BE3
+0x2346 0x20BE4
+0x2347 0x20BE5
+0x2348 0x20BEB
+0x234A 0x20BE6
+0x234B 0x20BE7
+0x234C 0x20BE8
+0x234F 0x211B9
+0x2351 0x211BA
+0x2353 0x21263
+0x2354 0x21264
+0x2356 0x21265
+0x2358 0x21266
+0x2359 0x2127C
+0x235A 0x21267
+0x235B 0x2F85A
+0x235C 0x21559
+0x235D 0x215E9
+0x235E 0x215EA
+0x235F 0x215EB
+0x2360 0x215EC
+0x2361 0x215ED
+0x2362 0x215EE
+0x2363 0x215EF
+0x2364 0x216BF
+0x2365 0x216CB
+0x2366 0x216C3
+0x2367 0x216D5
+0x2368 0x216C4
+0x2369 0x216C5
+0x236A 0x216D3
+0x236B 0x216C6
+0x236C 0x216C7
+0x236D 0x216C8
+0x236E 0x216C9
+0x236F 0x216CA
+0x2370 0x2194A
+0x2372 0x219D1
+0x2373 0x21B61
+0x2374 0x21C37
+0x2376 0x21D64
+0x2377 0x21D66
+0x2379 0x21D67
+0x237A 0x21D68
+0x237B 0x21D69
+0x237D 0x21D73
+0x237E 0x21D6A
+0x2421 0x21D6B
+0x2424 0x22072
+0x2426 0x221B9
+0x2427 0x2231C
+0x2428 0x22336
+0x2429 0x223BC
+0x242A 0x223BE
+0x242B 0x223BF
+0x242C 0x223C0
+0x242D 0x22487
+0x242E 0x225DC
+0x242F 0x225DD
+0x2430 0x225F5
+0x2431 0x225DE
+0x2432 0x225DF
+0x2433 0x2F89E
+0x2434 0x225E0
+0x2435 0x225E1
+0x2436 0x225E2
+0x2437 0x22A2C
+0x2438 0x22A2D
+0x243A 0x22AA9
+0x243B 0x22A9C
+0x243C 0x22A9D
+0x243D 0x22A9E
+0x243E 0x22A9F
+0x243F 0x22AA0
+0x2440 0x22AA1
+0x2441 0x22AA2
+0x2443 0x22AA3
+0x2444 0x22AA4
+0x2445 0x22AA7
+0x2446 0x23042
+0x2447 0x23093
+0x2448 0x23151
+0x244A 0x23152
+0x244B 0x23144
+0x244C 0x23153
+0x244D 0x23322
+0x244E 0x233C6
+0x244F 0x233C7
+0x2450 0x233C9
+0x2451 0x2F8DD
+0x2452 0x233CA
+0x2454 0x233C8
+0x2455 0x23B24
+0x2456 0x23B25
+0x2457 0x23B26
+0x2459 0x23B27
+0x245A 0x23B28
+0x245C 0x23C58
+0x245D 0x2F8FB
+0x245E 0x23CA7
+0x245F 0x23C88
+0x2460 0x23C89
+0x2461 0x23CA5
+0x2462 0x23CA8
+0x2463 0x23CA9
+0x2464 0x23CAA
+0x2465 0x23CAB
+0x2466 0x23CAC
+0x2467 0x23CAD
+0x2469 0x23C79
+0x246B 0x24194
+0x246C 0x24195
+0x246D 0x24196
+0x2470 0x24197
+0x2472 0x24198
+0x2473 0x2454E
+0x2474 0x2454F
+0x2475 0x24619
+0x2477 0x24741
+0x2478 0x2F92A
+0x2479 0x248F7
+0x247A 0x24C04
+0x247B 0x24C19
+0x247C 0x24C17
+0x247D 0x25040
+0x247E 0x250EC
+0x2521 0x2541B
+0x2522 0x2541C
+0x2524 0x2560E
+0x2525 0x25752
+0x2526 0x25AD8
+0x2527 0x25E26
+0x2528 0x26274
+0x252A 0x26275
+0x252B 0x269C6
+0x252C 0x26B0B
+0x252D 0x26B0C
+0x252E 0x26B0D
+0x252F 0x26B0E
+0x2530 0x26B0F
+0x2531 0x26B10
+0x2533 0x28459
+0x2534 0x2845A
+0x2535 0x28683
+0x2536 0x28684
+0x2537 0x28685
+0x253A 0x28E20
+0x253B 0x28E21
+0x253C 0x28E22
+0x253D 0x28E23
+0x253E 0x28E24
+0x253F 0x28E29
+0x2540 0x200F4
+0x2542 0x2158F
+0x2543 0x20151
+0x2545 0x20217
+0x2546 0x20218
+0x2547 0x2025B
+0x2548 0x20219
+0x2549 0x2021A
+0x254B 0x2021B
+0x254C 0x2021C
+0x254D 0x2021D
+0x254E 0x2021E
+0x254F 0x2021F
+0x2550 0x20220
+0x2551 0x20221
+0x2552 0x2048B
+0x2553 0x20488
+0x2555 0x20585
+0x2556 0x26287
+0x2557 0x205C7
+0x2558 0x2064C
+0x2559 0x2064D
+0x255A 0x206FC
+0x255B 0x206FD
+0x255C 0x206FE
+0x255D 0x206FF
+0x2560 0x20856
+0x2561 0x20857
+0x2562 0x20858
+0x2563 0x20859
+0x2564 0x208DC
+0x2565 0x208DD
+0x2566 0x20973
+0x2567 0x2099D
+0x2568 0x209A1
+0x2569 0x2099E
+0x256A 0x2099F
+0x256B 0x209A0
+0x256C 0x209E6
+0x256D 0x20A51
+0x256E 0x20A52
+0x256F 0x20B3D
+0x2570 0x20C22
+0x2572 0x20C23
+0x2573 0x20C24
+0x2574 0x20C25
+0x2575 0x20C26
+0x2576 0x20C27
+0x2577 0x20C28
+0x2578 0x20C29
+0x2579 0x20C2A
+0x257A 0x20C2B
+0x257C 0x20C40
+0x257D 0x20C2C
+0x257E 0x20C2D
+0x2621 0x20C2E
+0x2622 0x20C2F
+0x2623 0x20C30
+0x2624 0x211D0
+0x2625 0x212A8
+0x2626 0x21294
+0x2627 0x21295
+0x2628 0x21296
+0x2629 0x21297
+0x262A 0x21298
+0x262B 0x2129C
+0x262C 0x2129B
+0x262E 0x212A1
+0x262F 0x212A0
+0x2630 0x21299
+0x2631 0x2129A
+0x2632 0x212A7
+0x2634 0x21564
+0x2636 0x21600
+0x2637 0x21601
+0x263A 0x216E5
+0x263B 0x216E9
+0x263C 0x216FB
+0x263D 0x216FC
+0x263E 0x216EA
+0x263F 0x216EB
+0x2640 0x216EC
+0x2641 0x216ED
+0x2642 0x216EE
+0x2643 0x216EF
+0x2644 0x216FA
+0x2645 0x216F0
+0x2646 0x216F1
+0x2647 0x216F2
+0x2648 0x216F3
+0x2649 0x216F4
+0x264A 0x21952
+0x264B 0x21953
+0x264C 0x21954
+0x264D 0x21955
+0x264E 0x21958
+0x264F 0x21956
+0x2651 0x219DD
+0x2652 0x219DE
+0x2653 0x219E3
+0x2654 0x219DF
+0x2655 0x219E0
+0x2656 0x21B22
+0x2657 0x21B23
+0x2658 0x21B68
+0x2659 0x21BDF
+0x265B 0x21C44
+0x265C 0x21D94
+0x265D 0x21D95
+0x265E 0x21D96
+0x265F 0x21D97
+0x2660 0x21D98
+0x2661 0x21D99
+0x2662 0x2F879
+0x2663 0x21D9A
+0x2664 0x21D9B
+0x2665 0x21D9D
+0x2666 0x21D9E
+0x2667 0x21D9F
+0x2668 0x21DA0
+0x2669 0x21FF3
+0x266A 0x21FF2
+0x266B 0x2201F
+0x266C 0x22088
+0x266D 0x2218F
+0x266E 0x22190
+0x2670 0x221FD
+0x2671 0x221FE
+0x2672 0x221FF
+0x2673 0x22200
+0x2674 0x22201
+0x2675 0x2261A
+0x2677 0x225E3
+0x2678 0x225E4
+0x2679 0x225E5
+0x267A 0x225E6
+0x267B 0x225E7
+0x267C 0x225EB
+0x267D 0x225E8
+0x267E 0x225E9
+0x2721 0x225EA
+0x2722 0x2261D
+0x2723 0x229A4
+0x2724 0x229A3
+0x2725 0x22AD4
+0x2726 0x22AC6
+0x2727 0x22AC7
+0x2728 0x22AC8
+0x2729 0x22AC9
+0x272A 0x22ACA
+0x272B 0x22ACB
+0x272C 0x22ACC
+0x272D 0x22ACD
+0x272F 0x22ACE
+0x2731 0x22EB8
+0x2732 0x22EB9
+0x2733 0x22EBA
+0x2734 0x2306E
+0x2735 0x230DB
+0x2736 0x230DC
+0x2737 0x23168
+0x2738 0x23169
+0x2739 0x2316A
+0x273A 0x2316B
+0x273B 0x2316C
+0x273C 0x2316D
+0x273D 0x2316E
+0x273F 0x23324
+0x2740 0x23325
+0x2742 0x23400
+0x2743 0x233E5
+0x2744 0x233F9
+0x2745 0x233E7
+0x2746 0x233E8
+0x2747 0x233E9
+0x2748 0x233FE
+0x2749 0x233EA
+0x274A 0x233EB
+0x274B 0x233EC
+0x274D 0x233ED
+0x274F 0x233EE
+0x2751 0x233EF
+0x2753 0x23417