Skip to content

Instantly share code, notes, and snippets.

@mattlord
Created July 8, 2021 05:45
Show Gist options
  • Save mattlord/a5bb0efbe3c2e72dae713078c18a2671 to your computer and use it in GitHub Desktop.
Save mattlord/a5bb0efbe3c2e72dae713078c18a2671 to your computer and use it in GitHub Desktop.
mysql> select @@version;
+-----------+
| @@version |
+-----------+
| 8.0.25 |
+-----------+
1 row in set (0.00 sec)
mysql> select "Hey! 🙂" = "Hey! 😡" collate utf8mb4_general_ci;
+------------------------------------------------+
| "Hey! ?" = "Hey! ?" collate utf8mb4_general_ci |
+------------------------------------------------+
| 1 |
+------------------------------------------------+
1 row in set (0.00 sec)
mysql> select "Hey! 🙂" = "Hey! 😡" collate utf8mb4_0900_ai_ci;
+------------------------------------------------+
| "Hey! ?" = "Hey! ?" collate utf8mb4_0900_ai_ci |
+------------------------------------------------+
| 0 |
+------------------------------------------------+
1 row in set (0.00 sec)
mysql> select "ß" = "ss" collate utf8mb4_general_ci;
+----------------------------------------+
| "ß" = "ss" collate utf8mb4_general_ci |
+----------------------------------------+
| 0 |
+----------------------------------------+
1 row in set (0.00 sec)
mysql> select "ß" = "ss" collate utf8mb4_0900_ai_ci;
+----------------------------------------+
| "ß" = "ss" collate utf8mb4_0900_ai_ci |
+----------------------------------------+
| 1 |
+----------------------------------------+
1 row in set (0.00 sec)
mysql> select "a" = "Ä" collate utf8mb4_general_ci;
+---------------------------------------+
| "a" = "Ä" collate utf8mb4_general_ci |
+---------------------------------------+
| 1 |
+---------------------------------------+
1 row in set (0.00 sec)
mysql> select "a" = "Ä" collate utf8mb4_0900_as_ci;
+---------------------------------------+
| "a" = "Ä" collate utf8mb4_0900_as_ci |
+---------------------------------------+
| 0 |
+---------------------------------------+
1 row in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment