Fixed problem with SRU diagnostic 'First record position out of range'
[yaz-moved-to-github.git] / src / soap.c
index 45e86cb..8c23a9a 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: soap.c,v 1.13 2006-03-01 23:24:25 adam Exp $
+ * $Id: soap.c,v 1.15 2006-10-24 08:05:45 adam Exp $
  */
 /**
  * \file soap.c
@@ -14,7 +14,7 @@
 
 #include <yaz/soap.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
@@ -261,6 +261,8 @@ int z_soap_codec_enc_xsl(ODR o, Z_SOAP **pp,
             xmlDocSetRootElement(doc, body_ptr->children);
             body_ptr->children = 0;
             xmlFreeNode(envelope_ptr);
+            if (!encoding)
+                encoding = "utf-8";
         }
         if (stylesheet)
         {