I've recently started started using PDO and have hit a brick wall with character encoding. I have a mysql table set to UTF8,
in the head of my web page and my connection string is
$db = new PDO("mysql:host=$mysqlserver;dbname=$mysqldatabase;charset=utf8", $mysqluser, $mysqlpassword,
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"));
I've tried as many permutations of those as I can find on the web and yet when I use PDO, some characters are not displaying correctly that are fine with mysqli:
× (the times special character) is correct with mysqli but displays as × when using PDO.
I've probably made a novice mistake somewhere but I can't track it down.