ID: 36263 User updated by: thom at genx dot net Reported By: thom at genx dot net -Status: Bogus +Status: Closed Bug Type: DOM XML related Operating System: Linux (gentoo) PHP Version: 5.1.2 New Comment:
Thank you. That fixed the problem I was having. I do apologize for having skipped over the user contributed notes, but I did try other encoding functions (just not utf8_encode()). It is also strange that I did not get any warnings or errors as reported in the user notes (error reporting set at E_ALL). Thanks again. Previous Comments: ------------------------------------------------------------------------ [2006-02-02 19:52:04] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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