Swedish characters and UTF-8

前端 未结 7 1961
有刺的猬
有刺的猬 2020-12-01 20:59

I use UTF-8 on all my pages, but some Swedish characters (å ä and ö) get messed up (just a square box with some letters in). My database is set to utf8_gener

相关标签:
7条回答
  • 2020-12-01 21:51

    I think it is important that your file is encoded in the same way that of which you set your charset in the meta tag. When they differ I think there are problems. So you need to know what your file is encoded to!

    If file is encoded utf-8 then use:

    <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/>
    

    If yout file is encoded with ISO-8859 then use:

    <meta http-equiv="content-type" content="text/html" charset="ISO-8859-1"/>
    

    When I keept them both the same, the encoding of file and charset in meta-tag it worked. Good luck!

    0 讨论(0)
提交回复
热议问题