我正在开发一个支持泰语的网站。现在我在我的数据库中有泰国的数据是正确的,但是当我试图提取数据并在我的视图中显示时,一些垃圾内容就像这样显示在我的视图中,当我写一个核心Ÿ脚本并回显它的时候,一些垃圾内容显示得很正常。
In my db i have used collation : utf8_general_ci
In codeigniter's application/config/database.php i have the following configuration.
$db['livedb']['char_set'] = 'utf8';
$db['livedb']['dbcollat'] = 'utf8_general_ci';
And in the header view am using <meta charset="utf-8" />请帮帮我,我哪里错了?提前感谢您的帮助。
发布于 2014-04-15 19:26:31
您应该在视图中使用utf-8 meta
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
发布于 2014-04-15 19:27:42
您是否获得了用于在head标记中显示UTF8的meta标记
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">https://stackoverflow.com/questions/23082212
复制相似问题