HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Error when posting a comment with a smiley face
![denn](https://secure.gravatar.com/avatar/61168426cb3ea5debac04e715c3e9cde/?default=https%3A%2F%2Fvanillicon.com%2Fdadbc4e9afc958b7c9bce16415319d04_100.png&rating=g&size=100)
Hi! I have a problem when posting a comment with a smiley face. Error writing to the database
Incorrect string value: '\xF0\x9F\x99\x84"}...' for column `forum`.`GDN_Comment`.`Body` at row 1|Gdn_Database|Query|insert `GDN_Comment` (`Body`, `DiscussionID`, `InsertUserID`, `Format`, `DateInserted`, `InsertIPAddress`) values (:Body, :DiscussionID, :InsertUserID, :Format, :DateInserted, :InsertIPAddress)
vanilla version: 3.3
charset GDN_Comment utf8mb4_unicode_ci
mariadb 10.4.10
Help me solve the problem. Thank You 😊
0
Comments
I found a solution. Maybe someone will need it.
[mysqld]
collation-server=utf8mb4_unicode_ci
init-connect='SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci'
character-set-server=utf8mb4
[client]
default-character-set=utf8mb4
[mysql]
default-character-set=utf8mb4