Index: test/edu/ucsb/nceas/metacattest/ReaderWriterTest.java
===================================================================
--- test/edu/ucsb/nceas/metacattest/ReaderWriterTest.java	(nonexistent)
+++ test/edu/ucsb/nceas/metacattest/ReaderWriterTest.java	(revision 5744)
@@ -0,0 +1,219 @@
+/**
+ *  '$RCSfile$'
+ *  Copyright: 2004 Regents of the University of California and the
+ *              National Center for Ecological Analysis and Synthesis
+ *  Purpose: To test the Access Controls in metacat by JUnit
+ *
+ *   '$Author: leinfelder $'
+ *     '$Date: 2010-12-09 10:41:36 -0800 (Thu, 09 Dec 2010) $'
+ * '$Revision: 5712 $'
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+package edu.ucsb.nceas.metacattest;
+
+import java.io.*;
+import java.util.*;
+
+import org.apache.commons.io.IOUtils;
+
+import edu.ucsb.nceas.MCTestCase;
+import edu.ucsb.nceas.metacat.client.MetacatFactory;
+import edu.ucsb.nceas.metacat.client.MetacatInaccessibleException;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * A unit test to see which readers/writers break a non-ascii char stream
+ * @author berkley
+ */
+public class ReaderWriterTest extends MCTestCase 
+{
+    public static String testStr = "Checking characters like µ in doc";
+    
+    /**
+     * Constructor to build the test
+     *
+     * @param name the name of the test method
+     */
+    public ReaderWriterTest(String name) {
+        super(name);
+    }
+
+    /**
+     * Establish a testing framework by initializing appropriate objects
+     */
+    public void setUp() 
+    {
+        
+    }
+
+    /**
+     * Release any objects after tests are complete
+     */
+    public void tearDown() 
+    {
+    }
+
+    /**
+     * Create a suite of tests to be run together
+     */
+    public static Test suite() 
+    {
+        TestSuite suite = new TestSuite();
+        suite.addTest(new ReaderWriterTest("initialize"));
+        suite.addTest(new ReaderWriterTest("testStringReaderAndWriter"));
+        suite.addTest(new ReaderWriterTest("testFileReaderAndWriter"));
+        suite.addTest(new ReaderWriterTest("testBufferedReaderAndWriter"));
+        suite.addTest(new ReaderWriterTest("charArrayReaderAndWriter"));
+//        suite.addTest(new ReaderWriterTest("testBufferedReaderAndWriter"));
+//        suite.addTest(new ReaderWriterTest("testBufferedReaderAndWriter"));
+//        suite.addTest(new ReaderWriterTest("testBufferedReaderAndWriter"));
+//        suite.addTest(new ReaderWriterTest("testBufferedReaderAndWriter"));
+//        suite.addTest(new ReaderWriterTest("testBufferedReaderAndWriter"));
+        
+        return suite;
+    }
+    
+    /**
+     * test FileReader and FileWriter
+     */
+    public void charArrayReaderAndWriter()
+    {
+        try
+        {
+            CharArrayWriter caw = new CharArrayWriter();
+            char[] c = new char[testStr.length()];
+            testStr.getChars(0, testStr.length(), c, 0);
+            caw.write(c);
+            assertTrue(caw.toString().equals(testStr));
+            
+            CharArrayReader car = new CharArrayReader(c);
+            String s = readReader(car);
+            assertTrue(s.equals(testStr));
+        }
+        catch(Exception e)
+        {
+            fail("Unexpected error in testFileReaderAndWriter: " + e.getMessage());
+        }
+    }
+    
+    /**
+     * test FileReader and FileWriter
+     */
+    public void testBufferedReaderAndWriter()
+    {
+        try
+        {
+            File tmp = getTempFile();
+            FileWriter fw = new FileWriter(tmp);
+            BufferedWriter bw = new BufferedWriter(fw);
+            bw.write(testStr);
+            bw.flush();
+            bw.close();
+            
+            FileReader fr = new FileReader(tmp);
+            BufferedReader br = new BufferedReader(fr);
+            String s = readReader(br);
+            assertTrue(s.equals(testStr));
+        }
+        catch(Exception e)
+        {
+            fail("Unexpected error in testFileReaderAndWriter: " + e.getMessage());
+        }
+     
+    }
+    
+    /**
+     * test FileReader and FileWriter
+     */
+    public void testFileReaderAndWriter()
+    {
+        try
+        {
+            File tmp = getTempFile();
+            FileWriter fw = new FileWriter(tmp);
+            fw.write(testStr);
+            fw.flush();
+            fw.close();
+            
+            FileReader fr = new FileReader(tmp);
+            String s = readReader(fr);
+            assertTrue(s.equals(testStr));
+        }
+        catch(Exception e)
+        {
+            fail("Unexpected error in testFileReaderAndWriter: " + e.getMessage());
+        }
+     
+    }
+    
+    /**
+     * test StringReader and StringWriter
+     */
+    public void testStringReaderAndWriter()
+    {
+        try
+        {
+            StringReader sr = new StringReader(testStr);
+            String s = readReader(sr);
+            assertTrue(s.equals(testStr));
+            
+            Writer testWriter = writeStringToWriter(testStr);
+            assertTrue(testWriter.toString().equals(testStr));
+            
+            //tmp.delete();
+        }
+        catch(Exception e)
+        {
+            fail("Unexpected error in testStringReaderAndWriter");
+        }
+    }
+    
+    public void initialize()
+    {
+        assert(1 == 1);
+    }
+    
+    private Writer writeStringToWriter(String s)
+        throws IOException
+    {
+        StringWriter w = new StringWriter();
+        w.write(s);
+        return w;
+    }
+    
+    private String readReader(Reader sr)
+        throws IOException
+    {
+        char[] c = new char[1024];
+        int numread = sr.read(c, 0, 1024);
+        StringBuffer sb = new StringBuffer();
+        while(numread != -1)
+        {
+            sb.append(c, 0, numread);
+            numread = sr.read(c, 0, 1024);
+        }
+        return sb.toString();
+    }
+    
+    private File getTempFile()
+    {
+        File f = new File("/tmp/ReaderWriterTest." + new Date().getTime() + ".tmp");
+        return f;
+    }
+}
\ No newline at end of file
Index: test/edu/ucsb/nceas/metacattest/NonAsciiCharacterTest.java
===================================================================
--- test/edu/ucsb/nceas/metacattest/NonAsciiCharacterTest.java	(revision 5743)
+++ test/edu/ucsb/nceas/metacattest/NonAsciiCharacterTest.java	(revision 5744)
@@ -269,7 +269,7 @@
         TestSuite suite = new TestSuite();
         suite.addTest(new NonAsciiCharacterTest("initialize"));
         // Test basic functions
-        suite.addTest(new NonAsciiCharacterTest("invalidXMLCharacters201Test"));
+        /*suite.addTest(new NonAsciiCharacterTest("invalidXMLCharacters201Test"));
         suite.addTest(new NonAsciiCharacterTest("invalidXMLCharacters210Test"));
         suite.addTest(new NonAsciiCharacterTest("symbolEncodedFormat201Test"));
         suite.addTest(new NonAsciiCharacterTest("symbolEncodedFormat210Test"));
@@ -276,9 +276,9 @@
         suite.addTest(new NonAsciiCharacterTest("quote201Test"));
         suite.addTest(new NonAsciiCharacterTest("quote210Test"));
         suite.addTest(new NonAsciiCharacterTest("numericCharacterReferenceFormat201Test"));
-        suite.addTest(new NonAsciiCharacterTest("numericCharacterReferenceFormat210Test"));
+        suite.addTest(new NonAsciiCharacterTest("numericCharacterReferenceFormat210Test"));*/
         suite.addTest(new NonAsciiCharacterTest("nonLatinUnicodeCharacter201Test"));
-        suite.addTest(new NonAsciiCharacterTest("nonLatinUnicodeCharacter210Test"));
+        //suite.addTest(new NonAsciiCharacterTest("nonLatinUnicodeCharacter210Test"));
 
         return suite;
     }
@@ -503,7 +503,7 @@
      * Test inserting and reading an EML 2.0.1 document with the code representation 
      * of a micro sign (&#181). Read should succeed since the same document should be 
      * read back from disk that was submitted.  Query should succeed because we look 
-     * for the converted character (µ).
+     * for the converted character (¬µ).
      */
     public void numericCharacterReferenceFormat201Test() {
     	debug("\nRunning: numericCharacterReferenceFormat201Test");
@@ -512,7 +512,7 @@
             m.login(username, password);
             
             String testTitle = "Checking &#181; in doc: " + newdocid  + ".1";
-            String convertedTestTitle = "Checking µ in doc: " + newdocid  + ".1";
+            String convertedTestTitle = "Checking ¬µ in doc: " + newdocid  + ".1";
             
             testdocument = getTestEmlDoc(testTitle, EML2_0_1);
             insertDocid(newdocid + ".1", testdocument, SUCCESS, true);
@@ -543,7 +543,7 @@
      * Test inserting and reading an EML 2.1.0 document with the code representation 
      * of a micro sign (&#181). Read should succeed since the same document should be 
      * read back from disk that was submitted.  Query should succeed because we look 
-     * for the converted character (µ).
+     * for the converted character (¬µ).
      */
     public void numericCharacterReferenceFormat210Test() {
     	debug("\nRunning: numericCharacterReferenceFormat210Test");
@@ -552,7 +552,7 @@
             m.login(username, password);
             
             String testTitle = "Checking &#181; in doc: " + newdocid  + ".1";
-            String convertedTestTitle = "Checking µ in doc: " + newdocid  + ".1";
+            String convertedTestTitle = "Checking ¬µ in doc: " + newdocid  + ".1";
             
             testdocument = getTestEmlDoc(testTitle, EML2_1_0);
             insertDocid(newdocid + ".1", testdocument, SUCCESS, true);
@@ -580,10 +580,10 @@
     }
 
     /**
-     * Test inserting and reading an EML 2.0.1 document with the micro sign (µ). 
+     * Test inserting and reading an EML 2.0.1 document with the micro sign (¬µ). 
      * Read should succeed since the same document should be read back from disk 
      * that was submitted.  Query should succeed because we look for the same 
-     * character (µ).
+     * character (¬µ).
      */
     public void nonLatinUnicodeCharacter201Test() {
     	debug("\nRunning: nonLatinUnicodeCharacter201Test");
@@ -619,10 +619,10 @@
     }
     
     /**
-     * Test inserting and reading an EML 2.1.0 document with the micro sign (µ). 
+     * Test inserting and reading an EML 2.1.0 document with the micro sign (¬µ). 
      * Read should succeed since the same document should be read back from disk 
      * that was submitted.  Query should succeed because we look for the same 
-     * character (µ).
+     * character (¬µ).
      */
     public void nonLatinUnicodeCharacter210Test() {
     	debug("\nRunning: nonLatinUnicodeCharacter210Test");
@@ -630,7 +630,7 @@
             String newdocid = generateDocid();
             m.login(username, password);
             
-            String testTitle = "Checking characters like µ in doc: " + newdocid  + ".1";
+            String testTitle = "Checking characters like ¬µ in doc: " + newdocid  + ".1";
             
             testdocument = getTestEmlDoc(testTitle, EML2_1_0);
             insertDocid(newdocid + ".1", testdocument, SUCCESS, false);
