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");
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php