If the push content contains emoji expressions, the following modifications need to be made
1 Mysql must use version 5.5.3 or above (if it cannot be upgraded, please save it in base64 and then transcode it when pushing)
2 Modify the table and push content table fields to utf8mb4_unicode_ci encoding format (no need to change the system my.cnf, no need to restart mysql)
If you use apnsphp to push, there may still be a problem that the emoji expression becomes ?:
Please find the getPayload method of Message.php , add "false &&" to the convert transcoding judgment to disable execution. Because this code will truncate some emoji expressions.
Java code
if (false && !defined('JSON_UNESCAPED_UNICODE') && function_exists('mb_convert_encoding')) {
$sJSON = preg_replace_callback(
'~\\u([0-9a-f] {4})~i',
create_function('$aMatches', 'return mb_convert_encoding(pack("H*", $aMatches[1]), "UTF-8", "UTF-16");') ,