PHP Curl UTF-8 Charset

后端 未结 6 1858
囚心锁ツ
囚心锁ツ 2020-12-05 06:54

I have an php script which calls another web page and writes all the html of the page and everything goes ok however there is a charset problem. My php file encoding is utf-

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 07:49

    Simple: When you use curl it encodes the string to utf-8 you just need to decode them..

    Description
    
    string utf8_decode ( string $data )
    

    This function decodes data , assumed to be UTF-8 encoded, to ISO-8859-1.

提交回复
热议问题