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?
- Make sure to set the page charset to UTF-8 in the header
- If you write these signs in the document itself, make sure to save it as UTF-8
- 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.
精彩评论