I have Names which are stored using utf8_unicode_ci in database.
Ajax dataType property is dataType:"json"
And this is the php code:
$names = mysql_query($query);
$name_arr = array();
while($name = mysql_fetch_assoc($names)) {
$name_arr[] = $name;
}
echo json_encode($name_arr);
It returns ??? replacing Chinese characters. I think I didn’t do double encode. Can someone help me? Thanks.
Solved.
http://forums.mysql.com/read.php?103,17168,17515#msg-17515