I am having a problem with characters á, Á, ó, Ó, ú, Ú, í, Í, é, É being stored in our mysql DB as strange characters. We are using PDO for inserting to the DB.
The odd this is that I have a local copy of the site on my computer on WAMP which all works fine, and there is no encoding issue. The live site is on a Linux server, if that possibly makes a difference.
The local DB is a copy of the live DB, so all the encoding is the same in all of the tables.
I have tried setting the PDO encoding:
$pdo = new PDO('mysql:host=' . Settings::DBHostName() . ';charset=utf8;dbname=' . Settings::DBName(), Settings::DBUsername(), Settings::DBPassword(), array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ));
Any other suggestions? I can't see why it would work locally and not on our live site?