ID: 41000 Updated by: [EMAIL PROTECTED] -Summary: DOM documentation improvement Reported By: phpbug at elitecoders dot com Status: Open Bug Type: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant New Comment:
While I think that the DOM documentation needs to be improved overall, this bug is covering a very specific issue, namely dealing with UTF-8 in libxml. I have changed the summary accordingly. Previous Comments: ------------------------------------------------------------------------ [2007-04-05 01:39:29] phpbug at elitecoders dot com Description: ------------ I've been using PHP's DOM (both dom and domxml) for over a year and it's only today after a lot of research I've realized that because PHP uses libxml, and libxml uses UTF-8 internally that I have some serious issues with character encoding because of being ignorant of this. I'm strongly suggesting a large note near the beginning of the DOM pages where knowing this information would be useful. In addition to the note, it might also be a good idea to link users to http:// xmlsoft.org/encoding.html where it goes over the whole utf8 thing and why they use it and blah blah blah. Definitely a very visible note should be added here: http://www.php.net/manual/en/ref.dom.php On http://www.php.net/manual/en/function.dom-domdocument-construct.php "The encoding of the document as part of the XML declaration." Here, it should be clarified that if you pass a character encoding, it does not affect the internal character encoding and you still need to utf8_encode characters outside of the normal ASCII range. On http://www.php.net/manual/en/function.dom-domelement-construct.php and http://www.php.net/manual/en/function.dom-domtext-construct.php it needs to at least warn that characters outside of normal ascii need to be utf8 encoded. I'm sure there are other pages as well, I need to get going though. Reproduce code: --------------- Not applicable Expected result: ---------------- Not applicable Actual result: -------------- Not applicable ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41000&edit=1
