Simple html dom character encoding issue

后端 未结 3 1551
灰色年华
灰色年华 2020-12-18 11:07

I am using simple html dom to retrieve content from another website, but the thing is theres a character encoding issue with the stuff retrieved using simple html dom. The c

3条回答
  •  -上瘾入骨i
    2020-12-18 11:35

    Go to website and check their charset by viewing page info.

    $text = iconv(mb_detect_encoding($text), "UTF-8//TRANSLIT//IGNORE", $text);
    

提交回复
热议问题