I converted a forum MySQL database to utf8mb4. Seems to be working fine as Emojis are saving and displaying fine.
But I am having issues with a chatbox.
emojis are saved in the database as Unicode "%uD83D%uDE0B"
Works fine if emojis is inserted by phpmyadmin.
Can this be solved by mb_convert
or something ?
php 5.6
Could this be the problematic code-
$str = unhtmlspecialchars(str_replace(array("\n"), '', trim(convert_urlencoded_unicode($str))));
With code ☀️ 3 byte emoji works, do not. with code commented // hex for both.