Why is this the extended ascii character (â, é, etc) getting replaced with <?> characters?

后端 未结 8 784
自闭症患者
自闭症患者 2021-01-06 12:00

Why is this the extended ascii character (â, é, etc) getting replaced with characters?

I attached a pic... but I am using PHP to pull the data from MySQL,

8条回答
  •  南方客
    南方客 (楼主)
    2021-01-06 12:07

    You should encode all special chars into HTML entities instead of depending on the charset.

    htmlentities() will do the work for you.

提交回复
热议问题