Which collation should I use to store these country names in MySQL?

Posted by morpheous on Stack Overflow See other posts from Stack Overflow or by morpheous
Published on 2010-04-30T09:53:49Z Indexed on 2010/04/30 9:57 UTC
Read the original article Hit count: 247

Filed under:
|

I am trying to store a list of countries in a mySQL database.

I am having problems storing (non English) names like these:

  • São Tomé and Príncipe
  • República de El Salvador

They are stored with strange characters in the db, (and therefore output strangely in my HTML pages).

I have tried using different combinations of collations for the database and the MySQL connection collation:

The "obvious" setting was to use utf8_unicode_ci for both the databse and the connection information. To my utter surprise, that did not solve the problem.

Does anyone know how to resolve this issue?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about collation