You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP Question2Answer MySQL query error 1366: Incorrect string value: '\xF0\x9F\x91\x8D' for column 'content' at row 1 - Query: INSERT INTO qa_userprofile (userid, title, content) VALUES ('1', 'name', 'Test 👍') ON DUPLICATE KEY UPDATE content = VALUES(content)
Solution:
Probably we could clean the value in "qa-include/db/users.php":
function qa_db_user_profile_set($userid, $field, $value)
adding simply:
$value = qa_remove_utf8mb4($value);
Other solution:
The DB fields content and title are utf8mb3_general_ci. They could be altered to utf8mb4_general_ci to accept emojis. But probably for now the PHP solution is preferable.
The text was updated successfully, but these errors were encountered:
q2apro
changed the title
Bug: Page account, insert Emoji
Bug: Incorrect string value for Page account when inserting Emoji
Feb 23, 2023
Replicate Bug:
Result:
Solution:
Probably we could clean the value in "qa-include/db/users.php":
function qa_db_user_profile_set($userid, $field, $value)
adding simply:
$value = qa_remove_utf8mb4($value);
Other solution:
The DB fields
content
andtitle
are utf8mb3_general_ci. They could be altered to utf8mb4_general_ci to accept emojis. But probably for now the PHP solution is preferable.The text was updated successfully, but these errors were encountered: