cvs: php-src(PHP_5_3) /ext/simplexml simplexml.c
| From: | Ilia Alshanetsky | Date: | Fri, 23 May 2008 15:46:13 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/simplexml simplexml.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-50102@lists.php.net to get a copy of this message | ||
iliaa Fri May 23 15:46:13 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/simplexml simplexml.c
Log:
When dumping entire document to file via asXml() don't lose the encoding
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.35.2.13&r2=1.151.2.22.2.35.2.14&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.13
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.14
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.13 Sat May 3 15:09:37 2008
+++ php-src/ext/simplexml/simplexml.c Fri May 23 15:46:13 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simplexml.c,v 1.151.2.22.2.35.2.13 2008/05/03 15:09:37 colder Exp $ */
+/* $Id: simplexml.c,v 1.151.2.22.2.35.2.14 2008/05/23 15:46:13 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1364,7 +1364,7 @@
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 {
@@ -2478,7 +2478,7 @@
{
php_info_print_table_start();
php_info_print_table_header(2, "Simplexml support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.35.2.13 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.35.2.14 $");
php_info_print_table_row(2, "Schema support",
#ifdef LIBXML_SCHEMAS_ENABLED
"enabled");