Connection

suggest change

Vital to using character sets is to tell the MySQL-server what encoding the client’s bytes are. Here is one way:

SET NAMES utf8mb4;

Each language (PHP, Python, Java, and so on) has its own way to set the client character set, and that is usually preferable to SET NAMES.

SET NAMES utf8mb4 means the client bytes are utf8mb4. A column declared CHARACTER SET latin1 is stored as latin1: MySQL converts from utf8mb4 to latin1 on INSERT, and from latin1 back to utf8mb4 on SELECT. Characters that latin1 cannot represent are lost on insert.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents