I have created a table with utf8 character set. My problem is whenever I fetch data from that table, instead of actual utf8 data, mysql_fetch_assoc returns several "?". Is there a way to fetch utf8 data?
Heres is sample of my code
<?php
$con = mysql_connect("localhost","","");
mysql_select_db("test",$con);
$res = mysql_query("Select * from test",$con);
while ($row = mysql_fetch_assoc($res)) {
print($row['address']);
}
?>
My thoughts are to use the MySQLi API's to connect, rather than MySQL API's. They handle languages better and may resolve this issue, based on description (they understand encodings).
Bookmarks