I have a database full of German contacts.
The database itself displays all the unique German characters fine (when i’m looking at it in the admin control panel), but when I echo any special German character onto my site it displays as a � (or an empty square on Windows).
How can I get it to output the correct characters?
Everything is set to UTF-8 (the database table, columns and webpage encoding).
A quick fix to change connection charset (and I believe that’s your problem) is open the connection and then exec query ‘set names utf8;’. If you are using php version greater than 5, then you can mysql_set_charset(‘utf8’) instead of exec the query. That’s the preferred way.
But please notice that that query needs to be executed every time you open the connection so it will raise count of your mysql queries.