Documentation Home
MySQL Internals Manual


MySQL Internals Manual  /  ...  /  Character Set

14.1.4 Character Set

MySQL has a very flexible character set support as documented in Character Sets, Collations, Unicode. The list of character sets and their IDs can be queried as follows:

SELECT id, collation_name FROM information_schema.collations ORDER BY id;
+----+-------------------+
| id | collation_name    |
+----+-------------------+
|  1 | big5_chinese_ci   |
|  2 | latin2_czech_cs   |
|  3 | dec8_swedish_ci   |
|  4 | cp850_general_ci  |
|  5 | latin1_german1_ci |
|  6 | hp8_english_ci    |
|  7 | koi8r_general_ci  |
|  8 | latin1_swedish_ci |
|  9 | latin2_general_ci |
| 10 | swe7_swedish_ci   |
+----+-------------------+

The following table shows a few common character sets.

Number

Hex

Character Set Name

8

0x08

latin1_swedish_ci

33

0x21

utf8_general_ci

63

0x3f

binary

Protocol::CharacterSet

A character set is defined in the protocol as a integer.

Fields

  • charset_nr (2) -- number of the character set and collation


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.