utfmb4 character set has these
Supports BMP and supplementary characters.
Requires a maximum of four bytes per multibyte character.
utf8mb4 contrasts with the
utf8mb3 character set, which supports only
BMP characters and uses a maximum of three bytes per character:
For a BMP character,
utf8mb3have identical storage characteristics: same code values, same encoding, same length.
For a supplementary character,
utf8mb4requires four bytes to store it, whereas
utf8mb3cannot store the character at all. When converting
utf8mb4, you need not worry about converting supplementary characters because there will be none.
utf8mb4 is a superset of
utf8mb3, so for an operation such as the
following concatenation, the result has character set
utf8mb4 and the collation of
SELECT CONCAT(utf8mb3_col, utf8mb4_col);
Similarly, the following comparison in the
WHERE clause works according to the collation
SELECT * FROM utf8mb3_tbl, utf8mb4_tbl WHERE utf8mb3_tbl.utf8mb3_col = utf8mb4_tbl.utf8mb4_col;
To save space with
VARCHAR instead of
CHAR. Otherwise, MySQL must
reserve four bytes for each character in a
CHAR column that uses
utf8mb4 because that is the maximum
possible length. For example, MySQL must reserve 40 bytes for
CHAR(10) column that uses
For additional information about data type storage, see
Section 11.7, “Data Type Storage Requirements”. For information about
InnoDB physical row storage, including how
InnoDB tables that use
COMPACT row format handle UTF-8
internally, see Section 184.108.40.206, “The Physical Row Structure of an InnoDB Table”.