【发布时间】:2013-10-17 01:21:37
【问题描述】:
我正在使用一个简单的表单将字符串写入数据库,但大括号(检索时)被显示为特殊字符。
到目前为止,我已经尝试将表格排序规则更改为 UTF-8 以及使用 CodeIgniter Typography 类:
1. alter table test.vocab convert to character set utf8 collate
utf8_unicode_ci;
2. $this->load->library('typography');
$data['item'] = $this->typography->auto_typography($data['item'], FALSE);
但这并没有帮助。输出如下所示:
如果需要,我会发布更多代码。请帮忙。
【问题讨论】:
-
听起来这不是你的数据库。您是否在 html 文件标题中将页面字符集设置为 utf-8?
<meta charset="utf-8" />。另一件事可能是您的语言环境。尝试使用setlocale()。
标签: php codeigniter utf-8 quotes