我有特殊字符的数据(法国口音严重).当我用php脚本和输出(打印)选择它看起来很好.当我传递给Smarty时,角色会被改变.我的html有以下设置:meta http-equiv ="content-type"content ="text/html; charset = utf-8"不确定缺少什么或不正确?
克里斯
小智 0
将其放在您的 php 文件的开头并检查:
// UTF-8
header("Pragma: 无缓存"); header('内容类型:text/html; charset=utf-8');
// mbstring UTF8编码(可选)
mb_detect_order(array('UTF-8', 'ASCII')); mb_internal_encoding('UTF-8'); mb_http_output('UTF-8'); mb_regex_encoding('UTF-8');
| 归档时间: |
|
| 查看次数: |
8070 次 |
| 最近记录: |