maybe you are echo something before
<meta charset="utf-8">
and did you set charset for fetching data from database?
try {
$db = new PDO("mysql:host=localhost;dbname=dbname","root","");
<pre>
$db->exec("SET NAMES 'utf8'"); # <=== THIS
$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
} catch (Exception $e) {
echo "Can not connect to Database!";
exit;
}