The file is stored in the database like this: http://pastebin.com/s8ZeyKFS
When outputting to the html console, all characters are displayed normally.
When parsing regular too. Here is a screen.
But! As soon as I load into DomDocument, phpQuery, SimpleXML, Nokogiri, the text breaks down and incomprehensible characters are output!
$content = html_entity_decode($page['content'], ENT_QUOTES, 'UTF-8'); echo $content;//OK $dom = new DOMDocument('1.0', 'UTF-8'); $dom->loadHTML($content); echo $dom->getElementsByTagName('title') ->item(0)->textContent;//BROKEN What is the problem I can not understand, help?


