24
When we create a new base (whether it is in Mysql, Postgresql, Oracle, Sqlserver or other) we can choose which one encoding of that bank, for example, UTF-8 or Latin-1.
Is there any recommendation or does this choice make no difference?
In the case of encodings where a character may occupy more than one byte, like UTF-8, if I define a column like
varchar(5)
, I can store in it, for example, 5 special characters (example:àèáéú
)?The Mysql Workbench wizard offers different variations of some encodings such as Latin-1 and UTF-8. What is the difference between these variations?
UTF-8 for being virtually a global standard facilitates choice.
– Edilson
utf8_general_ci
because it’s almost bulletproof in special characters. I see no reason to use any other type of encoding except in some extremely exceptional case. Run fromlatin
.– Kazzkiq
The ones on the list are collations, not encodings. They should be chosen first of all, according to the encoding, and between those of the same encoding, which corresponds to the criterion you want, in the language in which the application is used.
– Bacco