Answer the question
In order to leave comments, you need to log in
Why does phpQuery get the page in windows-1251 encoding, although before that I converted the string to utf-8?
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
require_once __DIR__ . '/vendor/autoload.php';
$f = file_get_contents('http://gramota.ru/slovari/info/petr/imsm/');
$str = iconv( "windows-1251", "utf-8", $f);
$document = \phpQuery::newDocumentHTML($str);
var_dump($document);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question