Re: loadHTML/loadHTMLFile - DOM functions

From: Date: Sun, 17 Sep 2006 21:51:25 +0000
Subject: Re: loadHTML/loadHTMLFile - DOM functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-241874@lists.php.net to get a copy of this message
Leonidas Safran wrote:
Hello Rob,
Do you have your code somewhere?
Yes, I paste it below. There are two files, one for HTML output (which I make invisible with style declaration "display:none;" and the second file is a javascript function which is supposed to output the content...
Try this line: $this->ticker .= utf8_decode($child_elements->item($j)->textContent); Your original HTML document is ISO-8859-1, so when you want the text I think you want to convert the UTF-8 (Internally DOM document works with UTF-8) to ISO-8859-1. Just using the utf8_decode function here from ext/xml. This elminates those  characters you were getting. Rob

« previous php.general (#241874) next »