Michael A. Peters wrote:

function makeHTML($document) {
   $buffer = $document->saveHTML();
   $output = html_entity_decode($buffer,ENT_QUOTES,"UTF-8");
   return $output;

I'll try it and see what it does.

Huh - not tried above yet - but with

$test = $myxhtml->createElement('p','שלום');

both saveXML() and saveHTML() do the right thing.

However if I have the string


and load it into a DOM -

With loadHTML() the utf8 is lost regardless of whether I use saveXML() or saveHTML()

With loadXML() the utf8 is preserved regardless of whether or not I use saveXML() or saveHTML()

php 5.2.9
libxml2 2.6.26- (CentOS 5.3)

I wonder if the real utf8 problem people experience is really with loadHTML() and not with saveHTML() ??

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to