I am extracting the contents of a Windows-1251 encoded website using file_get_html and want to serve it as UTF-8.
I set the headers in UTF-8 using: header('Content-type: text/html; charset=UTF-8');
Then I display the data using iconv("cp1252","UTF-8",'"desc":"'.$desc);
The conclusion is no longer a strange question mark, but it is still not Cyrillic.
source share