Index: test/edu/ucsb/nceas/metacattest/ReaderWriterTest.java
===================================================================
--- test/edu/ucsb/nceas/metacattest/ReaderWriterTest.java	(revision 5749)
+++ test/edu/ucsb/nceas/metacattest/ReaderWriterTest.java	(revision 5750)
@@ -61,7 +61,7 @@
      */
     public void setUp() 
     {
-        
+        System.out.println("default charset is: " + Charset.defaultCharset().displayName());
     }
 
     /**
@@ -77,11 +77,11 @@
     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("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("testInputStreamReaderAndWriter"));
 //        suite.addTest(new ReaderWriterTest("testBufferedReaderAndWriter"));
 //        suite.addTest(new ReaderWriterTest("testBufferedReaderAndWriter"));
@@ -106,7 +106,8 @@
             
             FileInputStream fis = new FileInputStream(tmpFile);
             InputStreamReader isr = new InputStreamReader(fis);
-            String s = isr.toString();
+            String s = readReader(isr);
+            System.out.println("s: " + s);
             assertTrue(s.equals(testStr));
         }
         catch(Exception e)
Index: test/edu/ucsb/nceas/metacattest/NonAsciiCharacterTest.java
===================================================================
--- test/edu/ucsb/nceas/metacattest/NonAsciiCharacterTest.java	(revision 5749)
+++ test/edu/ucsb/nceas/metacattest/NonAsciiCharacterTest.java	(revision 5750)
@@ -25,6 +25,7 @@
 
 package edu.ucsb.nceas.metacattest;
 
+import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.StringReader;
@@ -48,6 +49,8 @@
 import junit.framework.TestSuite;
 import java.io.File;
 
+import org.apache.commons.io.IOUtils;
+
 /**
  * A JUnit test for testing Metacat when Non Ascii Characters are inserted
  */
@@ -603,7 +606,7 @@
             Thread.sleep(3000);
             queryDocWhichHasTitle(newdocid  + ".1", testTitle, EML2_0_1, SUCCESS);
             
-            deleteDocid(newdocid  + ".1", SUCCESS, false);
+            //deleteDocid(newdocid  + ".1", SUCCESS, false);
             
             m.logout();
         }
@@ -844,8 +847,11 @@
                                          boolean result,
                                          boolean expectedKarmaFailure) {
         try {
-            Reader r = new InputStreamReader(m.read(docid));
+            Reader r = new InputStreamReader(m.read(docid), "UTF-8");
+            //InputStream is = m.read(docid);
             String doc = IOUtil.getAsString(r, true);
+            //String doc = IOUtils.toString(is);
+            
             if (result) {
 
                 if (!testDoc.equals(doc)) {
Index: lib/web.xml.tomcat5
===================================================================
--- lib/web.xml.tomcat5	(revision 5749)
+++ lib/web.xml.tomcat5	(revision 5750)
@@ -91,6 +91,17 @@
   -->
 
 
+  <!-- D1 filters -->
+  <filter>
+    <filter-name>D1URLFilter</filter-name>
+    <filter-class>edu.ucsb.nceas.metacat.restservice.D1URLFilter</filter-class>
+  </filter>
+  
+  <filter-mapping>
+    <filter-name>D1URLFilter</filter-name>
+    <url-pattern>/d1/*</url-pattern>
+    <dispatcher>REQUEST</dispatcher>
+  </filter-mapping>
 
 
   <!-- spring dispatcher servlet, dispatches incoming requests to controllers -->
Index: src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java	(revision 5749)
+++ src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java	(revision 5750)
@@ -340,6 +340,8 @@
                     {
                         objectId = null;
                     }
+                    
+                    System.out.println("objectId in ReasourceHandler.handle: " + objectId);
 
                     logMetacat.debug("verb:" + httpVerb);
 
@@ -1578,6 +1580,7 @@
                 cs.setParamsFromRequest(request);
                 Identifier id = new Identifier();
                 id.setValue(guid);
+                System.out.println("creating object with guid " + id.getValue());
                 Identifier rId = cs.create(token, id, object, m);
                 serializeServiceType(Identifier.class, rId, out);
                 
Index: src/edu/ucsb/nceas/metacat/restservice/D1HttpRequest.java
===================================================================
--- src/edu/ucsb/nceas/metacat/restservice/D1HttpRequest.java	(nonexistent)
+++ src/edu/ucsb/nceas/metacat/restservice/D1HttpRequest.java	(revision 5750)
@@ -0,0 +1,71 @@
+/**
+ *  '$RCSfile$'
+ *  Copyright: 2010 Regents of the University of California and the
+ *              National Center for Ecological Analysis and Synthesis
+ *
+ *   '$Author: berkley $'
+ *     '$Date: 2009-06-13 13:28:21 +0300  $'
+ *
+ * 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.metacat.restservice;
+
+import java.util.Enumeration;
+import java.util.Map;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.http.*;
+
+/**
+ * @author berkley
+ * Class to override getPathInfo on the servlet request
+ */
+public class D1HttpRequest extends HttpServletRequestWrapper
+{
+    HttpServletRequest request;
+    String lastPathElement;
+    
+    /**
+     * HttpServletRequestWrapper(HttpServletRequest request) 
+     */
+    public D1HttpRequest(ServletRequest request)
+    {
+        super((HttpServletRequest)request);
+        this.request = (HttpServletRequest)request;
+        
+        /*Enumeration<String> paramNames = request.getParameterNames();
+        while(paramNames.hasMoreElements())
+        {
+            System.out.println("paramName: " + paramNames.nextElement());
+        }*/
+        System.out.println("request uri: " + this.request.getRequestURI());
+        String reqUri = this.request.getRequestURI();
+        this.lastPathElement = reqUri.substring(reqUri.lastIndexOf("/"), reqUri.length());
+    }
+    
+    /**
+     * override getPathInfo to handle special characters
+     * @return
+     */
+    @Override
+    public String getPathInfo()
+    {
+        //String s = super.getPathInfo();
+        String s = this.lastPathElement;
+        System.out.println("pathinfo: " + s);
+        return s;
+    }
+}
Index: src/edu/ucsb/nceas/metacat/restservice/D1URLFilter.java
===================================================================
--- src/edu/ucsb/nceas/metacat/restservice/D1URLFilter.java	(nonexistent)
+++ src/edu/ucsb/nceas/metacat/restservice/D1URLFilter.java	(revision 5750)
@@ -0,0 +1,55 @@
+/**
+ *  '$RCSfile$'
+ *  Copyright: 2010 Regents of the University of California and the
+ *              National Center for Ecological Analysis and Synthesis
+ *
+ *   '$Author: berkley $'
+ *     '$Date: 2009-06-13 13:28:21 +0300  $'
+ *
+ * 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.metacat.restservice;
+
+import javax.servlet.*;
+import java.io.*;
+
+/**
+ * @author berkley
+ *
+ */
+public class D1URLFilter implements Filter
+{
+    ServletContext context;
+    
+    public void init(FilterConfig filterConfig) 
+    {
+        System.out.println("D1URLFilter init.");
+        this.context = filterConfig.getServletContext();
+    }
+    
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 
+        throws IOException, ServletException 
+    {
+        System.out.println("In D1URLFilter.");
+        D1HttpRequest d1h = new D1HttpRequest(request);
+        chain.doFilter(d1h, response);
+    }
+    
+    public void destroy() 
+    {
+        System.out.println("D1URLFilter destroy.");
+    }
+}
Index: src/edu/ucsb/nceas/metacat/dataone/CrudService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/dataone/CrudService.java	(revision 5749)
+++ src/edu/ucsb/nceas/metacat/dataone/CrudService.java	(revision 5750)
@@ -302,7 +302,8 @@
         logMetacat.debug("Comparing guid|sysmeta_guid: " + guid.getValue() + "|" + sysmeta.getIdentifier().getValue());
         if (!guid.getValue().equals(sysmeta.getIdentifier().getValue())) {
             throw new InvalidSystemMetadata("1180", 
-                "GUID in method call does not match GUID in system metadata.");
+                "GUID in method call (" + guid.getValue() + ") does not match GUID in system metadata (" +
+                sysmeta.getIdentifier().getValue() + ").");
         }
 
         logMetacat.debug("Checking if identifier exists...");
