我有一個VPS(Debian,Apache,MySQL,PHP)強制utf-8編碼爲php頁
我想強制UTF-8編碼。我已經把這個行:
header('Content-type: application/json; charset: UTF-8');
但字符集仍然是ISO8859
我還編輯了php.ini中:/etc/php5/apache2/php.ini
mbstring.language=UTF-8
mbstring.internal_encoding= UTF-8
mbstring.http_input=UTF-8
mbstring.http_output=UTF-8
mbstring.detect_order= auto
和apache conf:
nano /etc/apache2/conf.d/charset
AddDefaultCharset UTF-8
iOS應用程序正在調用我的php頁面。我給它一個JSON輸出。但它收到ISO字符集...
當你說「字符集仍然是ISO8859」時,你是什麼意思?你在哪裏看到這個價值? –
我查看頁面信息(Firefox中的右鍵)編碼是ISO。我有一個JSON輸出。 – geekInside