我已经São Tomé and Príncipe存储在 MySQL 数据库中。
它在我的网页上显示为S�o Tom� and Pr�ncipe
无论如何直接从数据库中正确显示它?
我的 MySQL 类型是MyISAM,排序规则是utf8_general_ci
我的网页字符集是<meta charset="utf-8">
字段类型设置为varchar(30),字段排序规则与表相同utf8_general_ci
PHP 功能测试
utf8_decode()转换字符到S?o Tom? and Pr?ncipe
htmlspecialchars_decode()转换字符到S�o Tom� and Pr�ncipe
html_entity_decode()转换字符到S�o Tom� and Pr�ncipe
quoted_printable_decode()转换字符到S�o Tom� and Pr�ncipe
htmlentities()返回空白结果
多亏了@SAEVEN,它才能工作
在我的查询 SELECT 之前运行这个
mysqli_query($GLOBALS['db_link'], "SET NAMES 'utf8'");