Answer the question
In order to leave comments, you need to log in
Why is there an Incorrect string value error in utf8mb4 encoding?
Why does the error occur
Incorrect string value: '\\xD0\\xBF\\xD1\\x80\\xD0\\xB8...' for column 'phrase' at row 1
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
ALTER DATABASE schema_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Answer the question
In order to leave comments, you need to log in
SET character_set_connection = utf8mb4;
SET character_set_client = utf8mb4;
SET character_set_results = utf8mb4;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question