UTF8字符显示不正确


UTF8 Characters not displayed correctly

在我的mysql数据库中,我有德国变音符字符串(ä, ö, ü)。

我用php/mysql查询,当显示在我的网站上时,它们显示如下:

我有这个html在我的网站:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

编辑:我已更改所有排序为utf8_unicode_ci,但问题仍然存在

如果你已经写了html meta标签为charset=UTF-8,你已经设置排序为utf8_unicode_ci字符集,它不工作,那么你必须使用

 mysql_set_charset('utf8');

在你建立连接文件的地方使用这个,像这样:-

    $link = mysql_connect("localhost","root","");
    $db = mysql_select_db('testing');
    mysql_set_charset('utf8');