Edit report at https://bugs.php.net/bug.php?id=46835&edit=1
ID: 46835 Comment by: wahabmirjan at yahoo dot com Reported by: kasparsj at gmail dot com Summary: saveHTML automatically replaces unicode letters to entities Status: Not a bug Type: Bug Package: DOM XML related PHP Version: 5.2.8 Block user comment: N Private report: N New Comment: As of July 12, 2013, almost 5 years after this problem is reported, this still is a problem. Please fix it. Previous Comments: ------------------------------------------------------------------------ [2008-12-12 04:57:52] rricha...@php.net 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 This is the behavior exhibited from libxml2 when outputting in HTML format ------------------------------------------------------------------------ [2008-12-11 12:16:37] kasparsj at gmail dot com Description: ------------ DOMDocument->saveHTML replaces not only predefined entities, but also unicode letters, like Ä, Å¡, Ä. is this also as expected or a bug? this is related to: http://bugs.php.net/bug.php?id=37878 Reproduce code: --------------- $doc = new DOMDocument('1.0', 'UTF-8'); $doc->substituteEntities = false; $doc->appendChild($doc->createElement('p', 'Å¡aÄeÄ')); var_dump($doc->saveHTML()); Expected result: ---------------- <p>Å¡aÄeÄ</p> Actual result: -------------- <p>©šaēeā</p> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=46835&edit=1