You can run the following statement to return a list of available character sets in MySQL:
SHOW CHARACTER SET;
This returns a list displaying the character set name, a description, its default collation, and its maximum length.
You can also narrow it down with the LIKE
clause:
SHOW CHARACTER SET LIKE 'latin%';
In MySQL 8.0.11, this returns the following list:
Charset | Description | Default collation | Maxlen |
---|---|---|---|
latin1 | cp1252 West European | latin1_swedish_ci | 1 |
latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 |
latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |
latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |
And you can also use the WHERE
clause to provide an expression:
SHOW CHARACTER SET WHERE Description LIKE '%Thai%';
Result:
Charset | Description | Default collation | Maxlen |
---|---|---|---|
tis620 | TIS620 Thai | tis620_thai_ci | 1 |
You can also use SHOW COLLATION
to display a list of collations supported by the server.