 <p>Try this to force correct detection of the charset:</p> <pre><code>$doc = new DOMDocument(); @$doc-&gt;loadHTML('&lt;?xml encoding="UTF-8"&gt;' . $html); $nodes = $doc-&gt;getElementsByTagName('title'); $title = $nodes-&gt;item(0)-&gt;nodeValue; echo $title; </code></pre>