Cheers!
I am working on a database which is planning to answer many queries, the thing is that I want to know what would be the advantages of using utf8_spanish2_ci, utf16_spanish2_ci and utf32_spanish2_ci?
They want me to explain their advantages and disadvantages as well as which would be more optimal.
It should be noted that do not worry about how the queries are structured because I keep them constantly changing so that they are as optimal as possible.
Thank you!
First some definitions:
Character set: List of characters with their identification code.
Collations: A set of rules for comparing characters in a given character set.
utf8_spanish_ci
: Modern Spanishutf8_spanish2_ci
: Traditional Spanish.In both collations : 'ñ' is an independent letter, between 'n' and 'o'.
Traditional Spanish : 'ch' is a letter, ordered between 'c' and d, and 'll' is a letter placed between 'l' and 'm'
It means that if you use the utf8_spanish2_ci there will be two more letters and that both will allow you to have the letter eñe(Ñ) within your data and to be displayed.
They have nothing to do with the amount of data that will be inserted, they only define which letters will be shown and which will not, that is, if you use spanish_ci, the EÑE (Ñ) will be shown in the data something like "ÑAME", otherwise another type of collation would show you:
áóñ
instead of the EÑE(Ñ) and other elements such as accents and settled words and the � Character inspector would also appear where the EÑE(Ñ) isGo here to see the problems it would generate:
Why does the Inspector Character (�) appear in some data obtained from the Database?
I recommend utf_spanish_ci and then encode your HTML documents in utf-8, just like I did in my problem
MYSQL Collation When creating the MySQL database, make sure that the string fields and others are in utf8_spanish_ci and the collation of the tables as well.
HTML Content Put in the
<head>
of all HTML files:<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
PHP content