html5 显示 � 而不是法语字符
html5 displaying � instead of the french character
我一直在努力想弄清楚为什么我的法语字符显示为 "cr�� notre site Web" 而不是 "créé notre site Web"
我的编码设置为UTF-8,语言是fr。其他一些字符可以正常工作,只是 e 和 a 不行。
例如 "L’opinion de notre clientèle" 显示得很好。
MySQL 将数据存储为 utf8_unicode_ci。当我浏览 MySQL 中的数据时,它看起来也不错。
我的浏览器也设置为 utf-8
如有任何想法,我们将不胜感激。
您确定您的元标记 Content-Type
设置为 UTF8 吗?
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
HTML5
<meta charset="utf-8">
我在使用 UTF-8 时遇到了类似的问题,这对我有用:
$link->set_charset("utf8");
试试这个
<?php echo mb_convert_encoding($yourVariable, 'UTF-8', 'ASCII'); ?>
我一直在努力想弄清楚为什么我的法语字符显示为 "cr�� notre site Web" 而不是 "créé notre site Web"
我的编码设置为UTF-8,语言是fr。其他一些字符可以正常工作,只是 e 和 a 不行。
例如 "L’opinion de notre clientèle" 显示得很好。
MySQL 将数据存储为 utf8_unicode_ci。当我浏览 MySQL 中的数据时,它看起来也不错。
我的浏览器也设置为 utf-8
如有任何想法,我们将不胜感激。
您确定您的元标记 Content-Type
设置为 UTF8 吗?
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
HTML5
<meta charset="utf-8">
我在使用 UTF-8 时遇到了类似的问题,这对我有用:
$link->set_charset("utf8");
试试这个
<?php echo mb_convert_encoding($yourVariable, 'UTF-8', 'ASCII'); ?>