content_image/693766.jpg
The utfmb4  character set has these characteristics: 

•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, utf8mb4  and utf8mb3  have identical storage characteristics: same code values, same encoding, same length. 

•For a supplementary character, utf8mb4  requires four bytes to store it, whereas utf8mb3  cannot store the character at all. When converting utf8mb3  columns to utf8mb4 , you need not worry about converting supplementary characters because there are 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 utf8mb4_col : 

SELECT CONCAT(utf8mb3_col, utf8mb4_col); 

Similarly, the following comparison in the WHERE  clause works according to the collation of utf8mb4_col : 

SELECT * FROM utf8mb3_tbl, utf8mb4_tbl WHERE utf8mb3_tbl.utf8mb3_col = utf8mb4_tbl.utf8mb4_col; 

For information about data type storage as it relates to multibyte character sets, see String Type Storage Requirements. 

## 10.9.2 The utf8mb3 Character Set (3-Byte UTF-8 Unicode Encoding) 

The utf8mb3  character set has these characteristics: 

•Supports BMP characters only (no support for supplementary characters) 

•Requires a maximum of three bytes per multibyte character. 

Applications that use UTF-8 data but require supplementary character support should use utf8mb4  rather than utf8mb3  (see Section 10.9.1, “The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding)” ). 

Exactly the same set of characters is available in utf8mb3  and ucs2 . That is, they have the same repertoire. 

utf8  is an alias for utf8mb3 ; the character limit is implicit, rather than explicit in the name. 

<img src='content_image/693766.jpg'>

Note 

The utf8mb3  character set is deprecated and you should expect it to be removed in a future MySQL release. Please use utf8mb4  instead. Although utf8  is currently an alias for utf8mb3 , at some point utf8  is expected to become a reference to utf8mb4 . To avoid ambiguity about the meaning of utf8 , consider specifying utf8mb4  explicitly for character set references instead of utf8 . 

utf8mb3  can be used in CHARACTER SET  clauses, and utf8mb3_ collation_substring  in COLLATE  clauses, where collation_substring  is bin , czech_ci , danish_ci , esperanto_ci , estonian_ci , and so forth. For example: 

CREATE TABLE t (s1 CHAR(1) CHARACTER SET utf8mb3; SELECT * FROM t WHERE s1 COLLATE utf8mb3_general_ci = ’x’; 

