summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2008-05-23 15:46:54 +0000
committerIlia Alshanetsky <iliaa@php.net>2008-05-23 15:46:54 +0000
commitc29dac2f3211bb0ff9c4ab496b55febc548f4979 (patch)
treed867cc3b8b1f54894339a7bfb891ce025fce7fc2 /ext
parentfa6c5d542945fef15d144f6cde05b78cdf02cf52 (diff)
downloadphp-git-c29dac2f3211bb0ff9c4ab496b55febc548f4979.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 c0659e9f07..03320bf2ff 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1323,7 +1323,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 {