I have a file writed in french language and I want to load it with DomDocument to parse it
$this->doc = new \DomDocument('1.0', 'UTF-8');
$url = $this->file_get_contents_utf8('/file.html');
$array = Array();
$internalErrors = libxml_use_internal_errors(true);
@$this->doc->loadHTML($url);
$str = $this->doc->saveHTML($this->doc);
$xpath = new \DOMXpath($this->doc);
I saved the file with UTF8 and Tried to load it by forcing UTF-8 but it do not shows special chars like the accents
Mairie d'Amb**éri**
should be :
Mairie d'Ambé...