php problem with russian language

前端 未结 3 1580
野趣味
野趣味 2021-01-03 10:45

i get page in utf-8 with russian language using curl. if i echo text it show good. then i use such code

$dom = new domDocument; 

        /*** load the html          


        
3条回答
  •  长发绾君心
    2021-01-03 11:51

    mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8");

    The same thing worked for PHPQuery.

    P.S. I use phpQuery::newDocument($html);

    instead of $dom->loadHTML($html);

提交回复
热议问题