Index: DOMSerializerImpl.java
===================================================================
RCS file: /home/cvspublic/xml-xerces/java/src/org/apache/xml/serialize/DOMSerializerImpl.java,v
retrieving revision 1.26
diff -u -r1.26 DOMSerializerImpl.java
--- DOMSerializerImpl.java	23 Jun 2004 03:41:05 -0000	1.26
+++ DOMSerializerImpl.java	12 Jul 2004 19:30:56 -0000
@@ -29,6 +29,7 @@
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.URLConnection;
+import java.net.URLDecoder;
 import java.util.Vector;
 
 import org.apache.xerces.dom.AttrImpl;
@@ -928,10 +929,9 @@
             // Use FileOutputStream if this URI is for a local file.
             if (protocol.equals("file") 
                 && (host == null || host.length() == 0 || host.equals("localhost"))) {
-                // REVISIT: We have to decode %nn sequences. For
-                // now files containing spaces and other characters
-                // which were escaped in the URI will fail. -- mrglavas
-                out = new FileOutputStream(new File(url.getPath()));
+            	
+                	// Assumes UTF-8 encoding as recommended by W3C
+            		out = new FileOutputStream(new File(URLDecoder.decode(url.getFile(), "UTF-8")));              
             }
             // Try to write to some other kind of URI. Some protocols
             // won't support this, though HTTP should work.
