fixed bug reported by Petr Pajas, in the absence of encoding UTF-8 should

* xmlsave.c: fixed bug reported by Petr Pajas, in the absence of
  encoding UTF-8 should really be assumed. This may break if
  the HTTP headers indicates for example ISO-8859-1 since this
  then becomes a well formedness error.
Daniel
diff --git a/ChangeLog b/ChangeLog
index 9eec456..de8ad9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Mar 31 17:20:32 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+	* xmlsave.c: fixed bug reported by Petr Pajas, in the absence of
+	  encoding UTF-8 should really be assumed. This may break if 
+	  the HTTP headers indicates for example ISO-8859-1 since this
+	  then becomes a well formedness error.
+
 Thu Mar 31 16:57:18 CEST 2005 Daniel Veillard <daniel@veillard.com>
 
 	* SAX.c: fixed #172260 redundant assignment.
diff --git a/xmlsave.c b/xmlsave.c
index a894bc9..94ad085 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -1808,6 +1808,9 @@
 
     if ((buf == NULL) || (cur == NULL)) return;
 
+    if (encoding == NULL)
+        encoding = "UTF-8";
+
     memset(&ctxt, 0, sizeof(ctxt));
     ctxt.doc = doc;
     ctxt.buf = buf;