$dom = new domDocument;
$content = mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'); // require mb_string extension
@$dom->loadHTML($content);
$dom->preserveWhiteSpace = false;
Title:
Unicode problem when using domDocument in PHP
Description:
$dom = new domDocument; $content = mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'); // require mb_string extension @...
...
Rating:
4