Open
Description
Replicate Bug:
- Edit your account
- Insert "Test 👍" into the Name field
- Save
Result:
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.
Metadata
Assignees
Labels
No labels
Activity