From: [EMAIL PROTECTED] Operating system: slackware linux 2.4.16 PHP version: 4.2.0 PHP Bug Type: DOM XML related Bug description: encoding error?
I have found problems using documents with different encodings. When I add nodes from one document to another ($docAItem->add_child($docB->root()), if the flag encoding property of the target document has not been set when initially creating the document (using functions xmldoc, xmldocfile, etc., not setting the property manually with '$doc->encoding = "utf8"') then the encoding translation is not done. A possible workaround for this situation is to force the flag using dumpmem with the optional encoding flag set. ie: $docA = domxml_new_xmldoc(“1.0”); $docARoot = $docA->add_root(“root”); $docA = xmldoc($docA->dumpmem(0, “UTF8”)); It looks like the encoding property of the DomDocument object can’t be set manually. Also, when creating a new DomDocument from scratch (with domxml_new_xmldoc) the encoding property should be set to UTF8 as a default, or allow a second optional parameter in the xmldoc function to set the proper encoding. byeer, pipo_ -- Edit bug report at http://bugs.php.net/?id=17241&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17241&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17241&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17241&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17241&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17241&r=support Expected behavior: http://bugs.php.net/fix.php?id=17241&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17241&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17241&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17241&r=globals