DOMDocument seems to convert Chinese characters into codes, for instance,
???? will become
How can I keep the Chinese or other foreign language as they are instead of converting them into codes?
Below is my simple test,
$dom = new DOMDocument(); $dom->loadHTML($html);
If I add this below before loadHTML(),
$html = mb_convert_encoding($html, "HTML-ENTITIES", "UTF-8");
Even though the coverted codes will be displayed as Chinese characters,
你的乱发 still are not
???? what I am after....