I\'m trying to parse some HTML using DOMDocument, but when I do, I suddenly lose my encoding (at least that is how it appears to me).
$profile = \"
Can also encode like below.... gathered from https://davidwalsh.name/domdocument-utf8-problem
$profile = 'イリノイ州シカゴにて、アイルランド系の家庭に、9'; $dom = new DOMDocument(); $dom->loadHTML(mb_convert_encoding($profile, 'HTML-ENTITIES', 'UTF-8')); echo $dom->saveHTML();
イリノイ州シカゴにて、アイルランド系の家庭に、9