I have an application talking to a NodeJS server via socket, that server is talking to PHP via HTTP, and that PHP is using MySQL.
When I try to insert Emojis in a text field, and save it to DB, when I get it back I see "?".
If I copy Emojis from wikipedia (for example ✒️ ❤️
1.)Database : Change Database default collection as **utf8mb4 ** .
2)Table : Change Table collection as ** CHARACTER SET utf8mb4 COLLATE utf8mb4_bin **.
Query :
ALTER TABLE Tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE
utf8mb4_bin
3)Code :
insert into tablename (column1,column2,column3,column4,column5,column6,column7) values ('273','3','Hdhdhdh