Home > Software engineering >  Ukrainian letters are poorly sorted
Ukrainian letters are poorly sorted

Time:09-29

The problem is that when using order_by(), Ukrainian letters are incorrectly sorted alphabetically, that is, before "а", "б" is placed "і" and "є".

CodePudding user response:

Changing the column encoding to utf8mb4_unicode_ci helped me. PS. Failed to change the encoding of the entire database or table. Only the column.

CodePudding user response:

You can change the collation of all columns of a table this way:

ALTER TABLE <mytable> CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

There's no statement to change all tables in one operation. You have to do it one table at a time.

  • Related