$string = file_get_contents(\'http://example.com\'); if (\'UTF-8\' === mb_detect_encoding($string)) { $dom = new DOMDocument(); // hack to preserve UTF-8 ch
I had to add a utf8 header to get the correct view:
header('Content-Type: text/html; charset=utf-8');