I fixed this UTF-8 decoding before transferring it to HTML loading.
$dom->loadHTML( utf_decode( $html ) );
saveHTML()It seems to decode special characters, such as German umlauts, to their HTML objects. (Although I installed $dom->substituteEntities=false;... oO)
This is rather strange, although the documentation states:
The DOM extension uses UTF-8 encoding.
(http://www.php.net/manual/de/class.domdocument.php, search utf8)
Oh dear, PHP coding creates problems over and over ... never ending the story.
graup source
share