You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Run the following example:
<?
require_once("phpQuery-onefile.php");
$content = file_get_contents("http://www.prosveshenie.tv/index.php?id=5");
echo "Code #1:\n";
echo $content;
$doc = phpQuery::newDocumentHTML($content);
echo "Code #2:\n";
echo pq($doc)->html();
?>
Note that this page is in "windows-1251" encoding.
What is the expected output? What do you see instead?
The structure of HTML nodes in sections "Code #1" and "Code #2" must be the
same. While in fact big part of the source file is lost in "Code #2"...
What version of the product are you using? On what operating system?
phpQuery 0.9.5, CentOS (Linux)
Please provide any additional information below.
I tried manually converting source code to utf-8 on line #3:
--8<-----------------------
$content = iconv("windows-1251", "utf-8", $content);
// ...
$doc = phpQuery::newDocumentHTML($content);
--8<-----------------------
as well as specified encoding as a second parameter in newDocumentHTML on line
#5:
--8<-----------------------
$doc = phpQuery::newDocumentHTML($content, "windows-1251");
--8<-----------------------
None of these are working as expected...
Original issue reported on code.google.com by [email protected] on 11 Dec 2012 at 11:01
Activity
GoogleCodeExporter commentedon Apr 20, 2016
Original comment by
[email protected]on 4 Mar 2013 at 3:11GoogleCodeExporter commentedon Apr 20, 2016
Original comment by
[email protected]on 4 Mar 2013 at 5:22