I'm trying to parse some HTML of a Website. I had some working code but it wasn't very clean so i rewrote it a litte bit to use DomDocument and XPath.
The problem was that special characters (umlauts and some spaces) getting transformed due to some bug or behavior of DomDocument (see: php DOMDocument - manipulating and encoding). Using the hack mentioned in the answer from Thread above i umlauts are coming out clean (guess i need to use the hack :-( ). But the real problem is that some
whitespaces still getting transformed (into ASCII 194+160).
Any ideas why this is happening i how i can solve it?
Thanks.
$res = str_replace(array(chr(194), chr(160)),'',$res);