From: Adam Dickmeiss Date: Tue, 24 Oct 2006 08:05:45 +0000 (+0000) Subject: Fixed bug #706: XML hex encoding UTF-8 chars out of range 0-255. X-Git-Tag: YAZ.2.1.38~20 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=d21d3b30a525282f427f81219bf5a0b42e45bb04;p=yaz-moved-to-github.git Fixed bug #706: XML hex encoding UTF-8 chars out of range 0-255. In order to preserve UTF-8 sequences we must use xmlDocDumpMemoryEnc instead of xmlDocDumpMemory. The former is only used if a charset is given. YAZ reads that from the content-type HTTP header (;charset=). This however, does not make sense for SRU GET. So for SRU GET we force charset=utf-8 and use xmlDocDumpMemoryEnc. --- diff --git a/src/soap.c b/src/soap.c index 5bfa8b3..8c23a9a 100644 --- a/src/soap.c +++ b/src/soap.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: soap.c,v 1.14 2006-07-06 10:17:54 adam Exp $ + * $Id: soap.c,v 1.15 2006-10-24 08:05:45 adam Exp $ */ /** * \file soap.c @@ -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) {