【发布时间】:2011-11-09 14:44:45
【问题描述】:
我正在使用 codeigniter 并从 rss 提要中输入一些数据。 Codeigniter 似乎并没有自己逃避一切。以下是两个示例,您对我为什么会遇到此问题有任何想法吗?
// 事件 1
原始输入文字Fuel › A simple,
Mysql数据Fuel A simple,
什么 php 回显Fuel › A simple,
// 事件 2
读作I am looking for a new mouse... on
原始输入I am looking for a new mouse… on
Mysql数据I am looking for a new mouse <there is a line break here> on
什么 php 回显I am looking for a new mouse… on
【问题讨论】:
-
输入数据用什么字符集对其进行编码,数据库中的特定字段是什么排序规则?
-
在我看来更像是编码不匹配,而不是 CI 问题。浏览器、数据库和 PHP 都有能力搞砸它。确保您的 HTML 中有内容编码标头,并检查 MySQL 中数据库、表和列的编码。
-
@chris 数据库和列的排序规则都是
latin1_swedish_ci
标签: mysql codeigniter html-entities mysql-escape-string