Issue with utf-8 encoding using PHP + MySQL

后端 未结 10 1522
谎友^
谎友^ 2020-12-16 12:41

I moved data from MySQL 4 (they were originally set to latin2 encoding) to MySQL 5 and set encoding to utf-8. It

10条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-16 13:27

    Here is a fix. Set the header to header ('Content-type: text/html; charset=utf-8'); Then print your content using utf8_decode($content). You must have the two to make it work.

提交回复
热议问题