Tag collation

Locating potential duplicate before switching collation in MySQL

When you need to switch a fields collation you can check if any existing data will conflict with this change. For example a keyword-field might contain data that is considered unique in one collation but not in another. The Swedish character ä is considered a unique character in swedish collation but in general collation it [...]

Altering character set and collation of tables in MySQL

Altering the character set and collation of a table is sometimes not enough. You may have to alter the actual fields in the table to get MySQL to comply in some cases. I don’t know why or when MySQL does this. ALTER TABLE my_table DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;   ALTER TABLE my_table MODIFY my_field varchar(255) CHARACTER [...]

Preferred character set and collation in MySQL

My preferred character set is utf8. One big drawback in many cases can be that the default collation ignores accents for characters. The result is that “halla” and “hallå” is interpreted as the same word. This is of-course bad for storing general data such as names users or products that may very well have accented [...]