我在 mysql 中有一个 utf8_turkish_ci 编码的表。该列也已编码为 utf8_turkish_ci (varchar 250)。但土耳其字符显示不正确。正文中手动书写的土耳其语字符显示正确。我检查了标题。页眉是:
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Keep-Alive
Content-Length:405
Content-Type:text/html; charset=utf-8
Date:Wed, 25 Sep 2013 04:50:39 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=5, max=100
Pragma:no-cache
Server:Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7
X-Powered-By:PHP/5.4.7
土耳其字符是: Üü İı Öö Ğğ Şş
网页端
<?php
header('Content-Type: text/html; charset=utf-8');
?>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<?php
我想留在utf8。如何从 MySQL 获取数据并在网页中正确显示它们?我尝试了许多解决方案建议:/