Help Center/ GaussDB/ Compatibility(Distributed)/ MySQL Compatibility Description/ M-compatible Mode/ Character Sets
Updated on 2025-08-22 GMT+08:00
Character Sets
GaussDB allows you to specify the following character sets for databases, schemas, tables, or columns.
| MySQL | GaussDB |
|---|---|
| utf8mb4 | Supported. |
| utf8 | Supported. |
| gbk | Supported. |
| gb18030 | Supported. |
| binary | Supported. |
- utf8 and utf8mb4 refer to the same character set in GaussDB. The maximum code length is 4 bytes. If the current character set is utf8 and the collation is set to utf8mb4_bin, utf8mb4_general_ci, utf8mb4_unicode_ci, or utf8mb4_0900_ai_ci (for example, by running SELECT _utf8'a' collate utf8mb4_bin), MySQL reports an error but GaussDB does not. The difference also exists when the character set is utf8mb4 and the collation is set to utf8_bin, utf8_general_ci, or utf8_unicode_ci.
- The lexical syntax is parsed based on the byte stream. If a multi-byte character contains code that is consistent with symbols such as '\', '\'', and '\\', the behavior of the multi-byte character is inconsistent with that in MySQL. In this case, you are advised to disable the escape character function temporarily.
Parent topic: M-compatible Mode
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.