Some time ago I built a website using mysqli to access a database with user info. This database contains some text in cyrillic.
Yesteday I replaced the mysqli with PDO. Now all the cyrillic looks like this:
Ð’Ð¸ÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð‘ÐµÐ»Ð¾Ñ‡ÐºÐ¸Ð½Ð°
I have UTF8 encoding everywhere. Here is my code:
$pdo = new PDO('mysql:host=mysql.host.com;dbname=db;charset=utf8',
'database', 'password');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->exec("set names utf8");
return $pdo;
and on the page
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
What could be the reason?
I googled a lot but couldn't find a solution.