0
4

2 回答 2

12
于 2010-06-10T16:41:27.227 回答
2

Is UTF8 used consistently across the whole spectrum (MySQL, PHP, Apache, <meta>s, headers..)?

For me this worked out of the box:

$query = "update tbl set col = '♥☆' where id = 1";
mysql_query($query) or die(mysql_error());
$query = "select col from tbl where id = 1";
$res = mysql_query($query) or die(mysql_error());
print_r(mysql_fetch_row($res));

Debug output:

Content-type: text/html; charset=utf-8
Array
(
    [0] => ♥☆
)
于 2010-06-10T16:46:10.957 回答