|
|
| Line 280: |
Line 280: |
|
| |
|
| </pre> | | </pre> |
|
| |
| == ERROR 1366: Incorrect string value ==
| |
| Message: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x87\xAF\xF0\x9F...' for column 'XXX'
| |
|
| |
| Solution:
| |
| * Check the charset of PHP PDO. AND execute {{kbd | key=set names utf8mb4}}<ref>[https://stackoverflow.com/questions/54947392/incorrect-string-value-when-trying-to-pass-emoji-to-the-db-encoded-with-utf8mb4 php - Incorrect string value when trying to pass emoji to the db encoded with utf8mb4 - Stack Overflow]</ref>
| |
| * Check the configuration of table
| |
| ** CHARACTER SETS (aka 字元集、字符集): {{kbd | key=utf8mb4}}
| |
| ** COLLATION (aka 定序、字元序): {{kbd | key=utf8mb4_unicode_ci}}
| |
|
| |
|
| == Database and Table Operation Errors == | | == Database and Table Operation Errors == |