From: Ilia Alshanetsky Date: Fri, 23 May 2008 15:46:13 +0000 (+0000) Subject: When dumping entire document to file via asXml() don't lose the encoding X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~165 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33cb218c93dc897d90761554582b37a3a766b240;p=php When dumping entire document to file via asXml() don't lose the encoding --- diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 37b2dd1092..cfd4c86962 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1364,7 +1364,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 {