【发布时间】:2012-06-01 10:28:07
【问题描述】:
我有一个 VPS(Debian、Apache、MySQL、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 输出。
标签: php apache encoding utf-8 debian