#46835 [Opn->Bgs]: saveHTML automatically replaces unicode letters to entities

From: Date: Fri, 12 Dec 2008 04:57:53 +0000
Subject: #46835 [Opn->Bgs]: saveHTML automatically replaces unicode letters to entities
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131930@lists.php.net to get a copy of this message
ID: 46835 Updated by: rrichards@php.net Reported By: kasparsj at gmail dot com -Status: Open +Status: Bogus Bug Type: DOM XML related PHP Version: 5.2.8 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 This is the behavior exhibited from libxml2 when outputting in HTML format Previous Comments: ------------------------------------------------------------------------ [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>&copy;&scaron;a&#275;e&#257;</p> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46835&edit=1

« previous php.bugs (#131930) next »