【发布时间】:2013-01-08 01:50:03
【问题描述】:
我想打印我从数据库中检索到的许多国家字符串,但每次使用时我都有一个神秘的字符:
utf8_encode($string); the out put is (Algérie , Arménie ,Azerbaïdjan ,Biélorussie )
utf8_decode($string); -> (Algérie , Arménie , Azerba?djan , Bi?lorussie )
htmlentities($string); -> (Alg�©rie , Arm�©nie ,Azerbaïdjan, ... )
我已尝试放入标题:
header ("Content-Type:text/html;charset=ISO-8859-1"); ->Arménie , Azerbaïdjan
和
header ("Content-Type:text/html;charset=utf-8"); -> Azerba�djan
我已经检查了我的数据库的配置,我发现了
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_unicode_ci';
有什么想法吗?
【问题讨论】:
-
没有这些编码的东西会输出什么?
-
阿尔及利亚,阿梅尼,阿塞拜疆
标签: php codeigniter utf-8 html-entities