summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2008-05-23 15:46:13 +0000
committerIlia Alshanetsky <iliaa@php.net>2008-05-23 15:46:13 +0000
commit33cb218c93dc897d90761554582b37a3a766b240 (patch)
treeed4717dc418c7dd08d197f3ae3fb4227e679de66 /ext
parentcd62ae78b6e205021de5686deb03d54349aed285 (diff)
downloadphp-git-33cb218c93dc897d90761554582b37a3a766b240.tar.gz
When dumping entire document to file via asXml() don't lose the encoding
Diffstat (limited to 'ext')
-rw-r--r--ext/simplexml/simplexml.c2
1 files changed, 1 insertions, 1 deletions
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 {