0

I've been surfing on the web to find the best collation for my website if I expects values that contains especial characters like ñ ü ï á é í ó ú Ü Ä Ï... and others characters in German and Portuguese.

I don't use utf8_bin because I need the collation to be case insensitive(mostly because of search Purpouses). What's the best collation for this case?

user3173855
  • 43
  • 1
  • 10
  • possible duplicate of [UTF-8: General? Bin? Unicode?](http://stackoverflow.com/questions/2344118/utf-8-general-bin-unicode) – Tomalak Oct 30 '14 at 19:52
  • Collation isn't charset. You're looking for charset. Collation is a set of rules for sorting alphabet characters. – N.B. Oct 30 '14 at 20:36
  • You need to let us know whether your audience is mostly `es`. The collation differs a bit for Spanish and most other European languages. – O. Jones Nov 24 '22 at 23:42

1 Answers1

0

A case-insensitive collation is one that ends with _ci, such as utf8_general_ci.

Note that if you want the characters to be correctly sorted, you need to choose a collation specific to your language, such as utf8_german_ci. This might cause text in other languages to be incorrectly sorted. If you are mixing languages in your database, you will have to pick whatever collation produces the least awkward results.

See also the MySQL documentation:

Nisse Engström
  • 4,738
  • 23
  • 27
  • 42