# Character Sets and Collation

__*character set*__
__*collation*__

+ `SHOW CHARACTER SET`: To display a list of character sets that are supported
+ `SHOW COLLATION`: To display a list of collations that are supported
+ e.g:
  + `CREATE DATABASE universe DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin` 
```
tidb> SHOW COLLATION;
+--------------------+---------+------+---------+----------+---------+
| Collation          | Charset | Id   | Default | Compiled | Sortlen |
+--------------------+---------+------+---------+----------+---------+
| ascii_bin          | ascii   |   65 | Yes     | Yes      |       1 |
| binary             | binary  |   63 | Yes     | Yes      |       1 |
| gbk_bin            | gbk     |   87 |         | Yes      |       1 |
| gbk_chinese_ci     | gbk     |   28 | Yes     | Yes      |       1 |
| latin1_bin         | latin1  |   47 | Yes     | Yes      |       1 |
| utf8_bin           | utf8    |   83 | Yes     | Yes      |       1 |
| utf8_general_ci    | utf8    |   33 |         | Yes      |       1 |
| utf8_unicode_ci    | utf8    |  192 |         | Yes      |       1 |
| utf8mb4_bin        | ~!@utf8mb4@!~ |   46 | Yes     | Yes      |       1 |
| utf8mb4_general_ci | utf8mb4 |   45 |         | Yes      |       1 |
| utf8mb4_unicode_ci | utf8mb4 |  224 |         | Yes      |       1 |
+--------------------+---------+------+---------+----------+---------+
11 rows in set (0.00 sec)
```

------------------------------------------------------------

A character set is a collection of symbols and encodings. The default character set in TiDB is utf8mb4, which matches the default character set in MySQL 8.0 and later.

A collation is a rule that compares characters in a character set and the sort order of characters.
