utf-8 special characters not displaying

前端 未结 8 1332
暗喜
暗喜 2020-12-03 06:47

I moved my website from my local test server to NameCheap shared hosting and now I\'m running into a problem - some of the pages aren\'t displaying utf-8 special characters

8条回答
  •  醉梦人生
    2020-12-03 07:49

    set meta tag in head as

      
    

    use the link http://www.i18nqa.com/debug/utf8-debug.html to replace the symbols character you want.

    then use str_replace like

        $find = array('“', '’', '…', '—', '–', '‘', 'é', 'Â', '•', 'Ëœ', 'â€'); // en dash
                            $replace = array('“', '’', '…', '—', '–', '‘', 'é', '', '•', '˜', '”');
    $content = str_replace($find, $replace, $content);
    

    Its the method i use and help alot. Thanks!

提交回复
热议问题