I'm having a heck of a time getting ♥ type characters into my database using php.
I've got UTF-8 setting on the page
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
and
<?php
$line = $_REQUEST['line'];
$line = stripslashes($line);
$line = htmlspecialchars($line);
$line = trim($line);
$line = mysql_real_escape_string($line);
mysql_query("SET CHARACTER SET utf8");
$sql = "INSERT INTO posts (txt) values ('$line')";
mysql_query($sql, $cn);
?>
the result of the insert is a ? character
i'm sure there are people who've done this, but I'm really having trouble getting it right.
edit:
the MySQL table's collation and field's encoding is also set to utf8_unicode_ci