开发者

Problems with some characters

开发者 https://www.devze.com 2023-03-07 06:00 出处:网络
I was having problems with this character: ’ It displays as some rhombus like gibberish. 开发者_开发问答

I was having problems with this character:

It displays as some rhombus like gibberish.

开发者_开发问答

To fix this, I added $content =mb_convert_encoding($content,'UTF-8'); before displaying.

Now it doesn’t display the gibberish and the character either.

How do I fix this?


  1. Make sure to set the page charset to UTF-8 in the header
  2. If you write these signs in the document itself, make sure to save it as UTF-8
  3. If you store them in a database, make sure to have the table charset set to UTF-8 and write to and read from the database with the same charset.
0

精彩评论

暂无评论...
验证码 换一张
取 消