MySQL is funny with UTF8. You need to ensure the server is running in UTF and that the connection is as well
If you can modify the my.cnf file on your server you can add these to the [mysqld] section and restart it
character-set-server = utf8
skip-character-set-client-handshake
You could alternatively (or as well) use
query("SET NAMES utf8");
before sending/retrieving data to ensure the database expects UTF8 data to be passed