这:
<td><?php echo form_input('post_title',set_value('post_title',$post->post_title)); ?></td>
将在页面上显示希腊字符(或拉丁字符以外的任何字符),如 &#xxx。
这:
<p>Title: <input name="post_title" type="text" value="<?php echo $post->post_title ?>"/></p>
会正确显示。
我的 MySQL 类型是 MyISAM 和 utf8_latin_ci 排序规则。
尝试从 phpMyAdmin 浏览也给了我 &#xxx 中的希腊语...
错误在哪里?
PS来自codeigniter手册关于表单帮助方法
并且将始终根据配置文件中的字符集值添加属性 accept-charset。
我的配置文件设置为
$config['charset'] = 'UTF-8';
更新:我的页眉:
GET /posts/editpost/23 HTTP/1.1
Host: my.xxx.com
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22
Referer: http://my.xxx.com/posts
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3