What about html_entity_decode?
http://www.php.net/html_entity_decode
No. It doesn't help in this case.
DOMDocument->saveHTML() method converts any non-ascii characters into
entities.
For example, if the dom document has the text node value of:
שלום
It converts the string to entities:
שלום
Although the string is already in UTF-8. The DOMDocument is already
initialized with version "1.0" and encoding "UTF-8", the php file is in
UTF-8, the xml file is in UTF-8 and got <?xml version="1.0"
encoding="UTF-8"?> header.
Example:
<?php
$dom = new DOMDocument('1.0','utf-8');
$dom->loadXML("<html><body>שלום</body></html>");
$output = $dom->saveHTML();
header("Content-Type: text/html; charset=UTF-8");
echo $output;
?>
-thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php