ID: 36263 Updated by: [EMAIL PROTECTED] Reported By: thom at genx dot net -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: Linux (gentoo) PHP Version: 5.1.2 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php utf8 encode the character. And no it wont output © thats an HTML entity. Previous Comments: ------------------------------------------------------------------------ [2006-02-02 19:13:04] thom at genx dot net Description: ------------ When a copyright character (ascii 169) is present in a string that is added as a text node to the DOM structure, the element is always empty. The correct behavior is to encode the character as "©". Reproduce code: --------------- <?php $doc = new DOMDocument('1.0'); $t = $doc->appendChild($doc->createElement('test')); $t->appendChild($doc->createTextNode('&' . chr(169) . '<')); header('Content-type: text/xml'); echo $doc->saveXML(); ?> Expected result: ---------------- <?xml version="1.0"?> <test>&©<</test> Actual result: -------------- <?xml version="1.0"?> <test></test> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36263&edit=1