I have a MySQL database that is storing business data... In the database, when running a select against a business name that contains an accented e (é), it comes up correctly (showing me that it is stored correctly.) On our website, though, it is showing up as the diamond with the question mark.

I checked out database and found the following:

Character_sets_dir          /usr/share/mysql/charsets/
Character_set_client        utf8
Character_set_connection    utf8
Character_set_database      latin1
Character_set_filesystem    binary
Character_set_results       utf8
Character_set_server        latin1
Character_set_system        utf8

Where things get lost is on the website itself... The web page is encoded as UTF8...

Any ideas of where the conversion may be failing?



You need to ask the database from another angle. Please run this:


This will tell you what it sees. If you want to change the Character set and.or collation, do this:


In mysql, ALTER DATABASE can change character set and/or collation. I have mentioned this in my past posts in the DBA StackExchange :

| improve this answer | |
  • the result: CREATE DATABASE DBNAME /*!40100 DEFAULT CHARACTER SET latin1 */ – Wes Feb 4 '13 at 23:21
  • I'm assuming that I need to set it to UTF8 then... would this have any implications to other areas of the database? – Wes Feb 4 '13 at 23:22
  • This will not change the content of the database. It may change it for new data going forward. You may need to mysqldump the data, run the ALTER TABLE, and reload. – RolandoMySQLDBA Feb 4 '13 at 23:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.