From b55e780166eb099406a5ac033648eb21e3ac853d Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 23 May 2008 15:46:24 +0000 Subject: [PATCH] MFB:When dumping entire document to file via asXml() don't lose the encoding --- ext/simplexml/simplexml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 223d265a9a..c68850df31 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1392,7 +1392,7 @@ SXE_METHOD(asXML) if (node) { if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { - xmlDocDumpMemory((xmlDocPtr) sxe->document->ptr, &strval, &strval_len); + xmlDocDumpMemoryEnc((xmlDocPtr) sxe->document->ptr, &strval, &strval_len, ((xmlDocPtr) sxe->document->ptr)->encoding); RETVAL_STRINGL((char *)strval, strval_len, 1); xmlFree(strval); } else { -- 2.50.1