由于emoji是用四个字节的utf8来表示,而mysql由于历史愿意,utf8格式只能最左存储3个字节。当然也可以修改格式为utf8mb4来解决。
但为了多端表现一致,我采用另一种方式——正则替换。
原理就是使用正则将emoji替换为对应的bbcode,显示时再将bbcode替换为对应的图片,达到多端显示一致。
emoji编码范围 1F000-1FFFF
对应方法
/** * 转换img标签 * @param type $content 转换内容 * @param type $type 操作 show/显示图片,bbcode/转换为bbcode */ function emoji($content, $type = 'bbcode') { $emoji = [ "\xe2\x98\x80" => "[emoji=2600]", "\xe2\x98\x81" => "[emoji=2601]", "\xe2\x98\x94" => "[emoji=2614]", "\xe2\x9b\x84" => "[emoji=26c4]", "\xe2\x9a\xa1" => "[emoji=26a1]", "\xf0\x9f\x8c\x80" => "[emoji=1f300]", "\xf0\x9f\x8c\x81" => "[emoji=1f301]", "\xf0\x9f\x8c\x82" => "[emoji=1f302]", "\xf0\x9f\x8c\x83" => "[emoji=1f303]", "\xf0\x9f\x8c\x84" => "[emoji=1f304]", "\xf0\x9f\x8c\x85" => "[emoji=1f305]", "\xf0\x9f\x8c\x86" => "[emoji=1f306]", "\xf0\x9f\x8c\x87" => "[emoji=1f307]", "\xf0\x9f\x8c\x88" => "[emoji=1f308]", "\xe2\x9d\x84" => "[emoji=2744]", "\xe2\x9b\x85" => "[emoji=26c5]", "\xf0\x9f\x8c\x89" => "[emoji=1f309]", "\xf0\x9f\x8c\x8a" => "[emoji=1f30a]", "\xf0\x9f\x8c\x8b" => "[emoji=1f30b]", "\xf0\x9f\x8c\x8c" => "[emoji=1f30c]", "\xf0\x9f\x8c\x8f" => "[emoji=1f30f]", "\xf0\x9f\x8c\x91" => "[emoji=1f311]", "\xf0\x9f\x8c\x94" => "[emoji=1f314]", "\xf0\x9f\x8c\x93" => "[emoji=1f313]", "\xf0\x9f\x8c\x99" => "[emoji=1f319]", "\xf0\x9f\x8c\x95" => "[emoji=1f315]", "\xf0\x9f\x8c\x9b" => "[emoji=1f31b]", "\xf0\x9f\x8c\x9f" => "[emoji=1f31f]", "\xf0\x9f\x8c\xa0" => "[emoji=1f320]", "\xf0\x9f\x95\x90" => "[emoji=1f550]", "\xf0\x9f\x95\x91" => "[emoji=1f551]", "\xf0\x9f\x95\x92" => "[emoji=1f552]", "\xf0\x9f\x95\x93" => "[emoji=1f553]", "\xf0\x9f\x95\x94" => "[emoji=1f554]", "\xf0\x9f\x95\x95" => "[emoji=1f555]", "\xf0\x9f\x95\x96" => "[emoji=1f556]", "\xf0\x9f\x95\x97" => "[emoji=1f557]", "\xf0\x9f\x95\x98" => "[emoji=1f558]", "\xf0\x9f\x95\x99" => "[emoji=1f559]", "\xf0\x9f\x95\x9a" => "[emoji=1f55a]", "\xf0\x9f\x95\x9b" => "[emoji=1f55b]", "\xe2\x8c\x9a" => "[emoji=231a]", "\xe2\x8c\x9b" => "[emoji=231b]", "\xe2\x8f\xb0" => "[emoji=23f0]", "\xe2\x8f\xb3" => "[emoji=23f3]", "\xe2\x99\x88" => "[emoji=2648]", "\xe2\x99\x89" => "[emoji=2649]", "\xe2\x99\x8a" => "[emoji=264a]", "\xe2\x99\x8b" => "[emoji=264b]", "\xe2\x99\x8c" => "[emoji=264c]", "\xe2\x99\x8d" => "[emoji=264d]", "\xe2\x99\x8e" => "[emoji=264e]", "\xe2\x99\x8f" => "[emoji=264f]", "\xe2\x99\x90" => "[emoji=2650]", "\xe2\x99\x91" => "[emoji=2651]", "\xe2\x99\x92" => "[emoji=2652]", "\xe2\x99\x93" => "[emoji=2653]", "\xe2\x9b\x8e" => "[emoji=26ce]", "\xf0\x9f\x8d\x80" => "[emoji=1f340]", "\xf0\x9f\x8c\xb7" => "[emoji=1f337]", "\xf0\x9f\x8c\xb1" => "[emoji=1f331]", "\xf0\x9f\x8d\x81" => "[emoji=1f341]", "\xf0\x9f\x8c\xb8" => "[emoji=1f338]", "\xf0\x9f\x8c\xb9" => "[emoji=1f339]", "\xf0\x9f\x8d\x82" => "[emoji=1f342]", "\xf0\x9f\x8d\x83" => "[emoji=1f343]", "\xf0\x9f\x8c\xba" => "[emoji=1f33a]", "\xf0\x9f\x8c\xbb" => "[emoji=1f33b]", "\xf0\x9f\x8c\xb4" => "[emoji=1f334]", "\xf0\x9f\x8c\xb5" => "[emoji=1f335]", "\xf0\x9f\x8c\xbe" => "[emoji=1f33e]", "\xf0\x9f\x8c\xbd" => "[emoji=1f33d]", "\xf0\x9f\x8d\x84" => "[emoji=1f344]", "\xf0\x9f\x8c\xb0" => "[emoji=1f330]", "\xf0\x9f\x8c\xbc" => "[emoji=1f33c]", "\xf0\x9f\x8c\xbf" => "[emoji=1f33f]", "\xf0\x9f\x8d\x92" => "[emoji=1f352]", "\xf0\x9f\x8d\x8c" => "[emoji=1f34c]", "\xf0\x9f\x8d\x8e" => "[emoji=1f34e]", "\xf0\x9f\x8d\x8a" => "[emoji=1f34a]", "\xf0\x9f\x8d\x93" => "[emoji=1f353]", "\xf0\x9f\x8d\x89" => "[emoji=1f349]", "\xf0\x9f\x8d\x85" => "[emoji=1f345]", "\xf0\x9f\x8d\x86" => "[emoji=1f346]", "\xf0\x9f\x8d\x88" => "[emoji=1f348]", "\xf0\x9f\x8d\x8d" => "[emoji=1f34d]", "\xf0\x9f\x8d\x87" => "[emoji=1f347]", "\xf0\x9f\x8d\x91" => "[emoji=1f351]", "\xf0\x9f\x8d\x8f" => "[emoji=1f34f]", "\xf0\x9f\x91\x80" => "[emoji=1f440]", "\xf0\x9f\x91\x82" => "[emoji=1f442]", "\xf0\x9f\x91\x83" => "[emoji=1f443]", "\xf0\x9f\x91\x84" => "[emoji=1f444]", "\xf0\x9f\x91\x85" => "[emoji=1f445]", "\xf0\x9f\x92\x84" => "[emoji=1f484]", "\xf0\x9f\x92\x85" => "[emoji=1f485]", "\xf0\x9f\x92\x86" => "[emoji=1f486]", "\xf0\x9f\x92\x87" => "[emoji=1f487]", "\xf0\x9f\x92\x88" => "[emoji=1f488]", "\xf0\x9f\x91\xa4" => "[emoji=1f464]", "\xf0\x9f\x91\xa6" => "[emoji=1f466]", "\xf0\x9f\x91\xa7" => "[emoji=1f467]", "\xf0\x9f\x91\xa8" => "[emoji=1f468]", "\xf0\x9f\x91\xa9" => "[emoji=1f469]", "\xf0\x9f\x91\xaa" => "[emoji=1f46a]", "\xf0\x9f\x91\xab" => "[emoji=1f46b]", "\xf0\x9f\x91\xae" => "[emoji=1f46e]", "\xf0\x9f\x91\xaf" => "[emoji=1f46f]", "\xf0\x9f\x91\xb0" => "[emoji=1f470]", "\xf0\x9f\x91\xb1" => "[emoji=1f471]", "\xf0\x9f\x91\xb2" => "[emoji=1f472]", "\xf0\x9f\x91\xb3" => "[emoji=1f473]", "\xf0\x9f\x91\xb4" => "[emoji=1f474]", "\xf0\x9f\x91\xb5" => "[emoji=1f475]", "\xf0\x9f\x91\xb6" => "[emoji=1f476]", "\xf0\x9f\x91\xb7" => "[emoji=1f477]", "\xf0\x9f\x91\xb8" => "[emoji=1f478]", "\xf0\x9f\x91\xb9" => "[emoji=1f479]", "\xf0\x9f\x91\xba" => "[emoji=1f47a]", "\xf0\x9f\x91\xbb" => "[emoji=1f47b]", "\xf0\x9f\x91\xbc" => "[emoji=1f47c]", "\xf0\x9f\x91\xbd" => "[emoji=1f47d]", "\xf0\x9f\x91\xbe" => "[emoji=1f47e]", "\xf0\x9f\x91\xbf" => "[emoji=1f47f]", "\xf0\x9f\x92\x80" => "[emoji=1f480]", "\xf0\x9f\x92\x81" => "[emoji=1f481]", "\xf0\x9f\x92\x82" => "[emoji=1f482]", "\xf0\x9f\x92\x83" => "[emoji=1f483]", "\xf0\x9f\x90\x8c" => "[emoji=1f40c]", "\xf0\x9f\x90\x8d" => "[emoji=1f40d]", "\xf0\x9f\x90\x8e" => "[emoji=1f40e]", "\xf0\x9f\x90\x94" => "[emoji=1f414]", "\xf0\x9f\x90\x97" => "[emoji=1f417]", "\xf0\x9f\x90\xab" => "[emoji=1f42b]", "\xf0\x9f\x90\x98" => "[emoji=1f418]", "\xf0\x9f\x90\xa8" => "[emoji=1f428]", "\xf0\x9f\x90\x92" => "[emoji=1f412]", "\xf0\x9f\x90\x91" => "[emoji=1f411]", "\xf0\x9f\x90\x99" => "[emoji=1f419]", "\xf0\x9f\x90\x9a" => "[emoji=1f41a]", "\xf0\x9f\x90\x9b" => "[emoji=1f41b]", "\xf0\x9f\x90\x9c" => "[emoji=1f41c]", "\xf0\x9f\x90\x9d" => "[emoji=1f41d]", "\xf0\x9f\x90\x9e" => "[emoji=1f41e]", "\xf0\x9f\x90\xa0" => "[emoji=1f420]", "\xf0\x9f\x90\xa1" => "[emoji=1f421]", "\xf0\x9f\x90\xa2" => "[emoji=1f422]", "\xf0\x9f\x90\xa4" => "[emoji=1f424]", "\xf0\x9f\x90\xa5" => "[emoji=1f425]", "\xf0\x9f\x90\xa6" => "[emoji=1f426]", "\xf0\x9f\x90\xa3" => "[emoji=1f423]", "\xf0\x9f\x90\xa7" => "[emoji=1f427]", "\xf0\x9f\x90\xa9" => "[emoji=1f429]", "\xf0\x9f\x90\x9f" => "[emoji=1f41f]", "\xf0\x9f\x90\xac" => "[emoji=1f42c]", "\xf0\x9f\x90\xad" => "[emoji=1f42d]", "\xf0\x9f\x90\xaf" => "[emoji=1f42f]", "\xf0\x9f\x90\xb1" => "[emoji=1f431]", "\xf0\x9f\x90\xb3" => "[emoji=1f433]", "\xf0\x9f\x90\xb4" => "[emoji=1f434]", "\xf0\x9f\x90\xb5" => "[emoji=1f435]", "\xf0\x9f\x90\xb6" => "[emoji=1f436]", "\xf0\x9f\x90\xb7" => "[emoji=1f437]", "\xf0\x9f\x90\xbb" => "[emoji=1f43b]", "\xf0\x9f\x90\xb9" => "[emoji=1f439]", "\xf0\x9f\x90\xba" => "[emoji=1f43a]", "\xf0\x9f\x90\xae" => "[emoji=1f42e]", "\xf0\x9f\x90\xb0" => "[emoji=1f430]", "\xf0\x9f\x90\xb8" => "[emoji=1f438]", "\xf0\x9f\x90\xbe" => "[emoji=1f43e]", "\xf0\x9f\x90\xb2" => "[emoji=1f432]", "\xf0\x9f\x90\xbc" => "[emoji=1f43c]", "\xf0\x9f\x90\xbd" => "[emoji=1f43d]", "\xf0\x9f\x98\xa0" => "[emoji=1f620]", "\xf0\x9f\x98\xa9" => "[emoji=1f629]", "\xf0\x9f\x98\xb2" => "[emoji=1f632]", "\xf0\x9f\x98\x9e" => "[emoji=1f61e]", "\xf0\x9f\x98\xb5" => "[emoji=1f635]", "\xf0\x9f\x98\xb0" => "[emoji=1f630]", "\xf0\x9f\x98\x92" => "[emoji=1f612]", "\xf0\x9f\x98\x8d" => "[emoji=1f60d]", "\xf0\x9f\x98\xa4" => "[emoji=1f624]", "\xf0\x9f\x98\x9c" => "[emoji=1f61c]", "\xf0\x9f\x98\x9d" => "[emoji=1f61d]", "\xf0\x9f\x98\x8b" => "[emoji=1f60b]", "\xf0\x9f\x98\x98" => "[emoji=1f618]", "\xf0\x9f\x98\x9a" => "[emoji=1f61a]", "\xf0\x9f\x98\xb7" => "[emoji=1f637]", "\xf0\x9f\x98\xb3" => "[emoji=1f633]", "\xf0\x9f\x98\x83" => "[emoji=1f603]", "\xf0\x9f\x98\x85" => "[emoji=1f605]", "\xf0\x9f\x98\x86" => "[emoji=1f606]", "\xf0\x9f\x98\x81" => "[emoji=1f601]", "\xf0\x9f\x98\x82" => "[emoji=1f602]", "\xf0\x9f\x98\x8a" => "[emoji=1f60a]", "\xe2\x98\xba" => "[emoji=263a]", "\xf0\x9f\x98\x84" => "[emoji=1f604]", "\xf0\x9f\x98\xa2" => "[emoji=1f622]", "\xf0\x9f\x98\xad" => "[emoji=1f62d]", "\xf0\x9f\x98\xa8" => "[emoji=1f628]", "\xf0\x9f\x98\xa3" => "[emoji=1f623]", "\xf0\x9f\x98\xa1" => "[emoji=1f621]", "\xf0\x9f\x98\x8c" => "[emoji=1f60c]", "\xf0\x9f\x98\x96" => "[emoji=1f616]", "\xf0\x9f\x98\x94" => "[emoji=1f614]", "\xf0\x9f\x98\xb1" => "[emoji=1f631]", "\xf0\x9f\x98\xaa" => "[emoji=1f62a]", "\xf0\x9f\x98\x8f" => "[emoji=1f60f]", "\xf0\x9f\x98\x93" => "[emoji=1f613]", "\xf0\x9f\x98\xa5" => "[emoji=1f625]", "\xf0\x9f\x98\xab" => "[emoji=1f62b]", "\xf0\x9f\x98\x89" => "[emoji=1f609]", "\xf0\x9f\x98\xba" => "[emoji=1f63a]", "\xf0\x9f\x98\xb8" => "[emoji=1f638]", "\xf0\x9f\x98\xb9" => "[emoji=1f639]", "\xf0\x9f\x98\xbd" => "[emoji=1f63d]", "\xf0\x9f\x98\xbb" => "[emoji=1f63b]", "\xf0\x9f\x98\xbf" => "[emoji=1f63f]", "\xf0\x9f\x98\xbe" => "[emoji=1f63e]", "\xf0\x9f\x98\xbc" => "[emoji=1f63c]", "\xf0\x9f\x99\x80" => "[emoji=1f640]", "\xf0\x9f\x99\x85" => "[emoji=1f645]", "\xf0\x9f\x99\x86" => "[emoji=1f646]", "\xf0\x9f\x99\x87" => "[emoji=1f647]", "\xf0\x9f\x99\x88" => "[emoji=1f648]", "\xf0\x9f\x99\x8a" => "[emoji=1f64a]", "\xf0\x9f\x99\x89" => "[emoji=1f649]", "\xf0\x9f\x99\x8b" => "[emoji=1f64b]", "\xf0\x9f\x99\x8c" => "[emoji=1f64c]", "\xf0\x9f\x99\x8d" => "[emoji=1f64d]", "\xf0\x9f\x99\x8e" => "[emoji=1f64e]", "\xf0\x9f\x99\x8f" => "[emoji=1f64f]", "\xf0\x9f\x8f\xa0" => "[emoji=1f3e0]", "\xf0\x9f\x8f\xa1" => "[emoji=1f3e1]", "\xf0\x9f\x8f\xa2" => "[emoji=1f3e2]", "\xf0\x9f\x8f\xa3" => "[emoji=1f3e3]", "\xf0\x9f\x8f\xa5" => "[emoji=1f3e5]", "\xf0\x9f\x8f\xa6" => "[emoji=1f3e6]", "\xf0\x9f\x8f\xa7" => "[emoji=1f3e7]", "\xf0\x9f\x8f\xa8" => "[emoji=1f3e8]", "\xf0\x9f\x8f\xa9" => "[emoji=1f3e9]", "\xf0\x9f\x8f\xaa" => "[emoji=1f3ea]", "\xf0\x9f\x8f\xab" => "[emoji=1f3eb]", "\xe2\x9b\xaa" => "[emoji=26ea]", "\xe2\x9b\xb2" => "[emoji=26f2]", "\xf0\x9f\x8f\xac" => "[emoji=1f3ec]", "\xf0\x9f\x8f\xaf" => "[emoji=1f3ef]", "\xf0\x9f\x8f\xb0" => "[emoji=1f3f0]", "\xf0\x9f\x8f\xad" => "[emoji=1f3ed]", "\xe2\x9a\x93" => "[emoji=2693]", "\xf0\x9f\x8f\xae" => "[emoji=1f3ee]", "\xf0\x9f\x97\xbb" => "[emoji=1f5fb]", "\xf0\x9f\x97\xbc" => "[emoji=1f5fc]", "\xf0\x9f\x97\xbd" => "[emoji=1f5fd]", "\xf0\x9f\x97\xbe" => "[emoji=1f5fe]", "\xf0\x9f\x97\xbf" => "[emoji=1f5ff]", "\xf0\x9f\x91\x9e" => "[emoji=1f45e]", "\xf0\x9f\x91\x9f" => "[emoji=1f45f]", "\xf0\x9f\x91\xa0" => "[emoji=1f460]", "\xf0\x9f\x91\xa1" => "[emoji=1f461]", "\xf0\x9f\x91\xa2" => "[emoji=1f462]", "\xf0\x9f\x91\xa3" => "[emoji=1f463]", "\xf0\x9f\x91\x93" => "[emoji=1f453]", "\xf0\x9f\x91\x95" => "[emoji=1f455]", "\xf0\x9f\x91\x96" => "[emoji=1f456]", "\xf0\x9f\x91\x91" => "[emoji=1f451]", "\xf0\x9f\x91\x94" => "[emoji=1f454]", "\xf0\x9f\x91\x92" => "[emoji=1f452]", "\xf0\x9f\x91\x97" => "[emoji=1f457]", "\xf0\x9f\x91\x98" => "[emoji=1f458]", "\xf0\x9f\x91\x99" => "[emoji=1f459]", "\xf0\x9f\x91\x9a" => "[emoji=1f45a]", "\xf0\x9f\x91\x9b" => "[emoji=1f45b]", "\xf0\x9f\x91\x9c" => "[emoji=1f45c]", "\xf0\x9f\x91\x9d" => "[emoji=1f45d]", "\xf0\x9f\x92\xb0" => "[emoji=1f4b0]", "\xf0\x9f\x92\xb1" => "[emoji=1f4b1]", "\xf0\x9f\x92\xb9" => "[emoji=1f4b9]", "\xf0\x9f\x92\xb2" => "[emoji=1f4b2]", "\xf0\x9f\x92\xb3" => "[emoji=1f4b3]", "\xf0\x9f\x92\xb4" => "[emoji=1f4b4]", "\xf0\x9f\x92\xb5" => "[emoji=1f4b5]", "\xf0\x9f\x92\xb8" => "[emoji=1f4b8]", "\xf0\x9f\x87\xa8\xf0\x9f\x87\xb3" => "[emoji=1f1e81f1f3]", "\xf0\x9f\x87\xa9\xf0\x9f\x87\xaa" => "[emoji=1f1e91f1ea]", "\xf0\x9f\x87\xaa\xf0\x9f\x87\xb8" => "[emoji=1f1ea1f1f8]", "\xf0\x9f\x87\xab\xf0\x9f\x87\xb7" => "[emoji=1f1eb1f1f7]", "\xf0\x9f\x87\xac\xf0\x9f\x87\xa7" => "[emoji=1f1ec1f1e7]", "\xf0\x9f\x87\xae\xf0\x9f\x87\xb9" => "[emoji=1f1ee1f1f9]", "\xf0\x9f\x87\xaf\xf0\x9f\x87\xb5" => "[emoji=1f1ef1f1f5]", "\xf0\x9f\x87\xb0\xf0\x9f\x87\xb7" => "[emoji=1f1f01f1f7]", "\xf0\x9f\x87\xb7\xf0\x9f\x87\xba" => "[emoji=1f1f71f1fa]", "\xf0\x9f\x87\xba\xf0\x9f\x87\xb8" => "[emoji=1f1fa1f1f8]", "\xf0\x9f\x94\xa5" => "[emoji=1f525]", "\xf0\x9f\x94\xa6" => "[emoji=1f526]", "\xf0\x9f\x94\xa7" => "[emoji=1f527]", "\xf0\x9f\x94\xa8" => "[emoji=1f528]", "\xf0\x9f\x94\xa9" => "[emoji=1f529]", "\xf0\x9f\x94\xaa" => "[emoji=1f52a]", "\xf0\x9f\x94\xab" => "[emoji=1f52b]", "\xf0\x9f\x94\xae" => "[emoji=1f52e]", "\xf0\x9f\x94\xaf" => "[emoji=1f52f]", "\xf0\x9f\x94\xb0" => "[emoji=1f530]", "\xf0\x9f\x94\xb1" => "[emoji=1f531]", "\xf0\x9f\x92\x89" => "[emoji=1f489]", "\xf0\x9f\x92\x8a" => "[emoji=1f48a]", "\xf0\x9f\x85\xb0" => "[emoji=1f170]", "\xf0\x9f\x85\xb1" => "[emoji=1f171]", "\xf0\x9f\x86\x8e" => "[emoji=1f18e]", "\xf0\x9f\x85\xbe" => "[emoji=1f17e]", "\xf0\x9f\x8e\x80" => "[emoji=1f380]", "\xf0\x9f\x8e\x81" => "[emoji=1f381]", "\xf0\x9f\x8e\x82" => "[emoji=1f382]", "\xf0\x9f\x8e\x84" => "[emoji=1f384]", "\xf0\x9f\x8e\x85" => "[emoji=1f385]", "\xf0\x9f\x8e\x8c" => "[emoji=1f38c]", "\xf0\x9f\x8e\x86" => "[emoji=1f386]", "\xf0\x9f\x8e\x88" => "[emoji=1f388]", "\xf0\x9f\x8e\x89" => "[emoji=1f389]", "\xf0\x9f\x8e\x8d" => "[emoji=1f38d]", "\xf0\x9f\x8e\x8e" => "[emoji=1f38e]", "\xf0\x9f\x8e\x93" => "[emoji=1f393]", "\xf0\x9f\x8e\x92" => "[emoji=1f392]", "\xf0\x9f\x8e\x8f" => "[emoji=1f38f]", "\xf0\x9f\x8e\x87" => "[emoji=1f387]", "\xf0\x9f\x8e\x90" => "[emoji=1f390]", "\xf0\x9f\x8e\x83" => "[emoji=1f383]", "\xf0\x9f\x8e\x8a" => "[emoji=1f38a]", "\xf0\x9f\x8e\x8b" => "[emoji=1f38b]", "\xf0\x9f\x8e\x91" => "[emoji=1f391]", "\xf0\x9f\x93\x9f" => "[emoji=1f4df]", "\xe2\x98\x8e" => "[emoji=260e]", "\xf0\x9f\x93\x9e" => "[emoji=1f4de]", "\xf0\x9f\x93\xb1" => "[emoji=1f4f1]", "\xf0\x9f\x93\xb2" => "[emoji=1f4f2]", "\xf0\x9f\x93\x9d" => "[emoji=1f4dd]", "\xf0\x9f\x93\xa0" => "[emoji=1f4e0]", "\xe2\x9c\x89" => "[emoji=2709]", "\xf0\x9f\x93\xa8" => "[emoji=1f4e8]", "\xf0\x9f\x93\xa9" => "[emoji=1f4e9]", "\xf0\x9f\x93\xaa" => "[emoji=1f4ea]", "\xf0\x9f\x93\xab" => "[emoji=1f4eb]", "\xf0\x9f\x93\xae" => "[emoji=1f4ee]", "\xf0\x9f\x93\xb0" => "[emoji=1f4f0]", "\xf0\x9f\x93\xa2" => "[emoji=1f4e2]", "\xf0\x9f\x93\xa3" => "[emoji=1f4e3]", "\xf0\x9f\x93\xa1" => "[emoji=1f4e1]", "\xf0\x9f\x93\xa4" => "[emoji=1f4e4]", "\xf0\x9f\x93\xa5" => "[emoji=1f4e5]", "\xf0\x9f\x93\xa6" => "[emoji=1f4e6]", "\xf0\x9f\x93\xa7" => "[emoji=1f4e7]", "\xf0\x9f\x94\xa0" => "[emoji=1f520]", "\xf0\x9f\x94\xa1" => "[emoji=1f521]", "\xf0\x9f\x94\xa2" => "[emoji=1f522]", "\xf0\x9f\x94\xa3" => "[emoji=1f523]", "\xf0\x9f\x94\xa4" => "[emoji=1f524]", "\xe2\x9c\x92" => "[emoji=2712]", "\xf0\x9f\x92\xba" => "[emoji=1f4ba]", "\xf0\x9f\x92\xbb" => "[emoji=1f4bb]", "\xe2\x9c\x8f" => "[emoji=270f]", "\xf0\x9f\x93\x8e" => "[emoji=1f4ce]", "\xf0\x9f\x92\xbc" => "[emoji=1f4bc]", "\xf0\x9f\x92\xbd" => "[emoji=1f4bd]", "\xf0\x9f\x92\xbe" => "[emoji=1f4be]", "\xf0\x9f\x92\xbf" => "[emoji=1f4bf]", "\xf0\x9f\x93\x80" => "[emoji=1f4c0]", "\xe2\x9c\x82" => "[emoji=2702]", "\xf0\x9f\x93\x8d" => "[emoji=1f4cd]", "\xf0\x9f\x93\x83" => "[emoji=1f4c3]", "\xf0\x9f\x93\x84" => "[emoji=1f4c4]", "\xf0\x9f\x93\x85" => "[emoji=1f4c5]", "\xf0\x9f\x93\x81" => "[emoji=1f4c1]", "\xf0\x9f\x93\x82" => "[emoji=1f4c2]", "\xf0\x9f\x93\x93" => "[emoji=1f4d3]", "\xf0\x9f\x93\x96" => "[emoji=1f4d6]", "\xf0\x9f\x93\x94" => "[emoji=1f4d4]", "\xf0\x9f\x93\x95" => "[emoji=1f4d5]", "\xf0\x9f\x93\x97" => "[emoji=1f4d7]", "\xf0\x9f\x93\x98" => "[emoji=1f4d8]", "\xf0\x9f\x93\x99" => "[emoji=1f4d9]", "\xf0\x9f\x93\x9a" => "[emoji=1f4da]", "\xf0\x9f\x93\x9b" => "[emoji=1f4db]", "\xf0\x9f\x93\x9c" => "[emoji=1f4dc]", "\xf0\x9f\x93\x8b" => "[emoji=1f4cb]", "\xf0\x9f\x93\x86" => "[emoji=1f4c6]", "\xf0\x9f\x93\x8a" => "[emoji=1f4ca]", "\xf0\x9f\x93\x88" => "[emoji=1f4c8]", "\xf0\x9f\x93\x89" => "[emoji=1f4c9]", "\xf0\x9f\x93\x87" => "[emoji=1f4c7]", "\xf0\x9f\x93\x8c" => "[emoji=1f4cc]", "\xf0\x9f\x93\x92" => "[emoji=1f4d2]", "\xf0\x9f\x93\x8f" => "[emoji=1f4cf]", "\xf0\x9f\x93\x90" => "[emoji=1f4d0]", "\xf0\x9f\x93\x91" => "[emoji=1f4d1]", "\xf0\x9f\x8e\xbd" => "[emoji=1f3bd]", "\xe2\x9a\xbe" => "[emoji=26be]", "\xe2\x9b\xb3" => "[emoji=26f3]", "\xf0\x9f\x8e\xbe" => "[emoji=1f3be]", "\xe2\x9a\xbd" => "[emoji=26bd]", "\xf0\x9f\x8e\xbf" => "[emoji=1f3bf]", "\xf0\x9f\x8f\x80" => "[emoji=1f3c0]", "\xf0\x9f\x8f\x81" => "[emoji=1f3c1]", "\xf0\x9f\x8f\x82" => "[emoji=1f3c2]", "\xf0\x9f\x8f\x83" => "[emoji=1f3c3]", "\xf0\x9f\x8f\x84" => "[emoji=1f3c4]", "\xf0\x9f\x8f\x86" => "[emoji=1f3c6]", "\xf0\x9f\x8f\x88" => "[emoji=1f3c8]", "\xf0\x9f\x8f\x8a" => "[emoji=1f3ca]", "\xf0\x9f\x9a\x83" => "[emoji=1f683]", "\xf0\x9f\x9a\x87" => "[emoji=1f687]", "\xe2\x93\x82" => "[emoji=24c2]", "\xf0\x9f\x9a\x84" => "[emoji=1f684]", "\xf0\x9f\x9a\x85" => "[emoji=1f685]", "\xf0\x9f\x9a\x97" => "[emoji=1f697]", "\xf0\x9f\x9a\x99" => "[emoji=1f699]", "\xf0\x9f\x9a\x8c" => "[emoji=1f68c]", "\xf0\x9f\x9a\x8f" => "[emoji=1f68f]", "\xf0\x9f\x9a\xa2" => "[emoji=1f6a2]", "\xe2\x9c\x88" => "[emoji=2708]", "\xe2\x9b\xb5" => "[emoji=26f5]", "\xf0\x9f\x9a\x89" => "[emoji=1f689]", "\xf0\x9f\x9a\x80" => "[emoji=1f680]", "\xf0\x9f\x9a\xa4" => "[emoji=1f6a4]", "\xf0\x9f\x9a\x95" => "[emoji=1f695]", "\xf0\x9f\x9a\x9a" => "[emoji=1f69a]", "\xf0\x9f\x9a\x92" => "[emoji=1f692]", "\xf0\x9f\x9a\x91" => "[emoji=1f691]", "\xf0\x9f\x9a\x93" => "[emoji=1f693]", "\xe2\x9b\xbd" => "[emoji=26fd]", "\xf0\x9f\x85\xbf" => "[emoji=1f17f]", "\xf0\x9f\x9a\xa5" => "[emoji=1f6a5]", "\xf0\x9f\x9a\xa7" => "[emoji=1f6a7]", "\xf0\x9f\x9a\xa8" => "[emoji=1f6a8]", "\xe2\x99\xa8" => "[emoji=2668]", "\xe2\x9b\xba" => "[emoji=26fa]", "\xf0\x9f\x8e\xa0" => "[emoji=1f3a0]", "\xf0\x9f\x8e\xa1" => "[emoji=1f3a1]", "\xf0\x9f\x8e\xa2" => "[emoji=1f3a2]", "\xf0\x9f\x8e\xa3" => "[emoji=1f3a3]", "\xf0\x9f\x8e\xa4" => "[emoji=1f3a4]", "\xf0\x9f\x8e\xa5" => "[emoji=1f3a5]", "\xf0\x9f\x8e\xa6" => "[emoji=1f3a6]", "\xf0\x9f\x8e\xa7" => "[emoji=1f3a7]", "\xf0\x9f\x8e\xa8" => "[emoji=1f3a8]", "\xf0\x9f\x8e\xa9" => "[emoji=1f3a9]", "\xf0\x9f\x8e\xaa" => "[emoji=1f3aa]", "\xf0\x9f\x8e\xab" => "[emoji=1f3ab]", "\xf0\x9f\x8e\xac" => "[emoji=1f3ac]", "\xf0\x9f\x8e\xad" => "[emoji=1f3ad]", "\xf0\x9f\x8e\xae" => "[emoji=1f3ae]", "\xf0\x9f\x80\x84" => "[emoji=1f004]", "\xf0\x9f\x8e\xaf" => "[emoji=1f3af]", "\xf0\x9f\x8e\xb0" => "[emoji=1f3b0]", "\xf0\x9f\x8e\xb1" => "[emoji=1f3b1]", "\xf0\x9f\x8e\xb2" => "[emoji=1f3b2]", "\xf0\x9f\x8e\xb3" => "[emoji=1f3b3]", "\xf0\x9f\x8e\xb4" => "[emoji=1f3b4]", "\xf0\x9f\x83\x8f" => "[emoji=1f0cf]", "\xf0\x9f\x8e\xb5" => "[emoji=1f3b5]", "\xf0\x9f\x8e\xb6" => "[emoji=1f3b6]", "\xf0\x9f\x8e\xb7" => "[emoji=1f3b7]", "\xf0\x9f\x8e\xb8" => "[emoji=1f3b8]", "\xf0\x9f\x8e\xb9" => "[emoji=1f3b9]", "\xf0\x9f\x8e\xba" => "[emoji=1f3ba]", "\xf0\x9f\x8e\xbb" => "[emoji=1f3bb]", "\xf0\x9f\x8e\xbc" => "[emoji=1f3bc]", "\xe3\x80\xbd" => "[emoji=303d]", "\xf0\x9f\x93\xb7" => "[emoji=1f4f7]", "\xf0\x9f\x93\xb9" => "[emoji=1f4f9]", "\xf0\x9f\x93\xba" => "[emoji=1f4fa]", "\xf0\x9f\x93\xbb" => "[emoji=1f4fb]", "\xf0\x9f\x93\xbc" => "[emoji=1f4fc]", "\xf0\x9f\x92\x8b" => "[emoji=1f48b]", "\xf0\x9f\x92\x8c" => "[emoji=1f48c]", "\xf0\x9f\x92\x8d" => "[emoji=1f48d]", "\xf0\x9f\x92\x8e" => "[emoji=1f48e]", "\xf0\x9f\x92\x8f" => "[emoji=1f48f]", "\xf0\x9f\x92\x90" => "[emoji=1f490]", "\xf0\x9f\x92\x91" => "[emoji=1f491]", "\xf0\x9f\x92\x92" => "[emoji=1f492]", "\xf0\x9f\x94\x9e" => "[emoji=1f51e]", "\xc2\xa9" => "[emoji=a9]", "\xc2\xae" => "[emoji=ae]", "\xe2\x84\xa2" => "[emoji=2122]", "\xe2\x84\xb9" => "[emoji=2139]", "#\xe2\x83\xa3" => "[emoji=1f51f]", "1\xe2\x83\xa3" => "[emoji=1c4e3]", "2\xe2\x83\xa3" => "[emoji=1c8e3]", "3\xe2\x83\xa3" => "[emoji=1cce3]", "4\xe2\x83\xa3" => "[emoji=1d0e3]", "5\xe2\x83\xa3" => "[emoji=1d4e3]", "6\xe2\x83\xa3" => "[emoji=1d8e3]", "7\xe2\x83\xa3" => "[emoji=1dce3]", "8\xe2\x83\xa3" => "[emoji=1e0e3]", "9\xe2\x83\xa3" => "[emoji=1e4e3]", "0\xe2\x83\xa3" => "[emoji=1c0e3]", "\xf0\x9f\x94\x9f" => "[emoji=1f51f]", "\xf0\x9f\x93\xb6" => "[emoji=1f4f6]", "\xf0\x9f\x93\xb3" => "[emoji=1f4f3]", "\xf0\x9f\x93\xb4" => "[emoji=1f4f4]", "\xf0\x9f\x8d\x94" => "[emoji=1f354]", "\xf0\x9f\x8d\x99" => "[emoji=1f359]", "\xf0\x9f\x8d\xb0" => "[emoji=1f370]", "\xf0\x9f\x8d\x9c" => "[emoji=1f35c]", "\xf0\x9f\x8d\x9e" => "[emoji=1f35e]", "\xf0\x9f\x8d\xb3" => "[emoji=1f373]", "\xf0\x9f\x8d\xa6" => "[emoji=1f366]", "\xf0\x9f\x8d\x9f" => "[emoji=1f35f]", "\xf0\x9f\x8d\xa1" => "[emoji=1f361]", "\xf0\x9f\x8d\x98" => "[emoji=1f358]", "\xf0\x9f\x8d\x9a" => "[emoji=1f35a]", "\xf0\x9f\x8d\x9d" => "[emoji=1f35d]", "\xf0\x9f\x8d\x9b" => "[emoji=1f35b]", "\xf0\x9f\x8d\xa2" => "[emoji=1f362]", "\xf0\x9f\x8d\xa3" => "[emoji=1f363]", "\xf0\x9f\x8d\xb1" => "[emoji=1f371]", "\xf0\x9f\x8d\xb2" => "[emoji=1f372]", "\xf0\x9f\x8d\xa7" => "[emoji=1f367]", "\xf0\x9f\x8d\x96" => "[emoji=1f356]", "\xf0\x9f\x8d\xa5" => "[emoji=1f365]", "\xf0\x9f\x8d\xa0" => "[emoji=1f360]", "\xf0\x9f\x8d\x95" => "[emoji=1f355]", "\xf0\x9f\x8d\x97" => "[emoji=1f357]", "\xf0\x9f\x8d\xa8" => "[emoji=1f368]", "\xf0\x9f\x8d\xa9" => "[emoji=1f369]", "\xf0\x9f\x8d\xaa" => "[emoji=1f36a]", "\xf0\x9f\x8d\xab" => "[emoji=1f36b]", "\xf0\x9f\x8d\xac" => "[emoji=1f36c]", "\xf0\x9f\x8d\xad" => "[emoji=1f36d]", "\xf0\x9f\x8d\xae" => "[emoji=1f36e]", "\xf0\x9f\x8d\xaf" => "[emoji=1f36f]", "\xf0\x9f\x8d\xa4" => "[emoji=1f364]", "\xf0\x9f\x8d\xb4" => "[emoji=1f374]", "\xe2\x98\x95" => "[emoji=2615]", "\xf0\x9f\x8d\xb8" => "[emoji=1f378]", "\xf0\x9f\x8d\xba" => "[emoji=1f37a]", "\xf0\x9f\x8d\xb5" => "[emoji=1f375]", "\xf0\x9f\x8d\xb6" => "[emoji=1f376]", "\xf0\x9f\x8d\xb7" => "[emoji=1f377]", "\xf0\x9f\x8d\xbb" => "[emoji=1f37b]", "\xf0\x9f\x8d\xb9" => "[emoji=1f379]", "\xe2\x86\x97" => "[emoji=2197]", "\xe2\x86\x98" => "[emoji=2198]", "\xe2\x86\x96" => "[emoji=2196]", "\xe2\x86\x99" => "[emoji=2199]", "\xe2\xa4\xb4" => "[emoji=2934]", "\xe2\xa4\xb5" => "[emoji=2935]", "\xe2\x86\x94" => "[emoji=2194]", "\xe2\x86\x95" => "[emoji=2195]", "\xe2\xac\x86" => "[emoji=2b06]", "\xe2\xac\x87" => "[emoji=2b07]", "\xe2\x9e\xa1" => "[emoji=27a1]", "\xe2\xac\x85" => "[emoji=2b05]", "\xe2\x96\xb6" => "[emoji=25b6]", "\xe2\x97\x80" => "[emoji=25c0]", "\xe2\x8f\xa9" => "[emoji=23e9]", "\xe2\x8f\xaa" => "[emoji=23ea]", "\xe2\x8f\xab" => "[emoji=23eb]", "\xe2\x8f\xac" => "[emoji=23ec]", "\xf0\x9f\x94\xba" => "[emoji=1f53a]", "\xf0\x9f\x94\xbb" => "[emoji=1f53b]", "\xf0\x9f\x94\xbc" => "[emoji=1f53c]", "\xf0\x9f\x94\xbd" => "[emoji=1f53d]", "\xe2\xad\x95" => "[emoji=2b55]", "\xe2\x9d\x8c" => "[emoji=274c]", "\xe2\x9d\x8e" => "[emoji=274e]", "\xe2\x9d\x97" => "[emoji=2757]", "\xe2\x81\x89" => "[emoji=2049]", "\xe2\x80\xbc" => "[emoji=203c]", "\xe2\x9d\x93" => "[emoji=2753]", "\xe2\x9d\x94" => "[emoji=2754]", "\xe2\x9d\x95" => "[emoji=2755]", "\xe3\x80\xb0" => "[emoji=3030]", "\xe2\x9e\xb0" => "[emoji=27b0]", "\xe2\x9e\xbf" => "[emoji=27bf]", "\xe2\x9d\xa4" => "[emoji=2764]", "\xf0\x9f\x92\x93" => "[emoji=1f493]", "\xf0\x9f\x92\x94" => "[emoji=1f494]", "\xf0\x9f\x92\x95" => "[emoji=1f495]", "\xf0\x9f\x92\x96" => "[emoji=1f496]", "\xf0\x9f\x92\x97" => "[emoji=1f497]", "\xf0\x9f\x92\x98" => "[emoji=1f498]", "\xf0\x9f\x92\x99" => "[emoji=1f499]", "\xf0\x9f\x92\x9a" => "[emoji=1f49a]", "\xf0\x9f\x92\x9b" => "[emoji=1f49b]", "\xf0\x9f\x92\x9c" => "[emoji=1f49c]", "\xf0\x9f\x92\x9d" => "[emoji=1f49d]", "\xf0\x9f\x92\x9e" => "[emoji=1f49e]", "\xf0\x9f\x92\x9f" => "[emoji=1f49f]", "\xe2\x99\xa5" => "[emoji=2665]", "\xe2\x99\xa0" => "[emoji=2660]", "\xe2\x99\xa6" => "[emoji=2666]", "\xe2\x99\xa3" => "[emoji=2663]", "\xf0\x9f\x9a\xac" => "[emoji=1f6ac]", "\xf0\x9f\x9a\xad" => "[emoji=1f6ad]", "\xe2\x99\xbf" => "[emoji=267f]", "\xf0\x9f\x9a\xa9" => "[emoji=1f6a9]", "\xe2\x9a\xa0" => "[emoji=26a0]", "\xe2\x9b\x94" => "[emoji=26d4]", "\xe2\x99\xbb" => "[emoji=267b]", "\xf0\x9f\x9a\xb2" => "[emoji=1f6b2]", "\xf0\x9f\x9a\xb6" => "[emoji=1f6b6]", "\xf0\x9f\x9a\xb9" => "[emoji=1f6b9]", "\xf0\x9f\x9a\xba" => "[emoji=1f6ba]", "\xf0\x9f\x9b\x80" => "[emoji=1f6c0]", "\xf0\x9f\x9a\xbb" => "[emoji=1f6bb]", "\xf0\x9f\x9a\xbd" => "[emoji=1f6bd]", "\xf0\x9f\x9a\xbe" => "[emoji=1f6be]", "\xf0\x9f\x9a\xbc" => "[emoji=1f6bc]", "\xf0\x9f\x9a\xaa" => "[emoji=1f6aa]", "\xf0\x9f\x9a\xab" => "[emoji=1f6ab]", "\xe2\x9c\x94" => "[emoji=2714]", "\xf0\x9f\x86\x91" => "[emoji=1f191]", "\xf0\x9f\x86\x92" => "[emoji=1f192]", "\xf0\x9f\x86\x93" => "[emoji=1f193]", "\xf0\x9f\x86\x94" => "[emoji=1f194]", "\xf0\x9f\x86\x95" => "[emoji=1f195]", "\xf0\x9f\x86\x96" => "[emoji=1f196]", "\xf0\x9f\x86\x97" => "[emoji=1f197]", "\xf0\x9f\x86\x98" => "[emoji=1f198]", "\xf0\x9f\x86\x99" => "[emoji=1f199]", "\xf0\x9f\x86\x9a" => "[emoji=1f19a]", "\xf0\x9f\x88\x81" => "[emoji=1f201]", "\xf0\x9f\x88\x82" => "[emoji=1f202]", "\xf0\x9f\x88\xb2" => "[emoji=1f232]", "\xf0\x9f\x88\xb3" => "[emoji=1f233]", "\xf0\x9f\x88\xb4" => "[emoji=1f234]", "\xf0\x9f\x88\xb5" => "[emoji=1f235]", "\xf0\x9f\x88\xb6" => "[emoji=1f236]", "\xf0\x9f\x88\x9a" => "[emoji=1f21a]", "\xf0\x9f\x88\xb7" => "[emoji=1f237]", "\xf0\x9f\x88\xb8" => "[emoji=1f238]", "\xf0\x9f\x88\xb9" => "[emoji=1f239]", "\xf0\x9f\x88\xaf" => "[emoji=1f22f]", "\xf0\x9f\x88\xba" => "[emoji=1f23a]", "\xe3\x8a\x99" => "[emoji=3299]", "\xe3\x8a\x97" => "[emoji=3297]", "\xf0\x9f\x89\x90" => "[emoji=1f250]", "\xf0\x9f\x89\x91" => "[emoji=1f251]", "\xe2\x9e\x95" => "[emoji=2795]", "\xe2\x9e\x96" => "[emoji=2796]", "\xe2\x9c\x96" => "[emoji=2716]", "\xe2\x9e\x97" => "[emoji=2797]", "\xf0\x9f\x92\xa0" => "[emoji=1f4a0]", "\xf0\x9f\x92\xa1" => "[emoji=1f4a1]", "\xf0\x9f\x92\xa2" => "[emoji=1f4a2]", "\xf0\x9f\x92\xa3" => "[emoji=1f4a3]", "\xf0\x9f\x92\xa4" => "[emoji=1f4a4]", "\xf0\x9f\x92\xa5" => "[emoji=1f4a5]", "\xf0\x9f\x92\xa6" => "[emoji=1f4a6]", "\xf0\x9f\x92\xa7" => "[emoji=1f4a7]", "\xf0\x9f\x92\xa8" => "[emoji=1f4a8]", "\xf0\x9f\x92\xa9" => "[emoji=1f4a9]", "\xf0\x9f\x92\xaa" => "[emoji=1f4aa]", "\xf0\x9f\x92\xab" => "[emoji=1f4ab]", "\xf0\x9f\x92\xac" => "[emoji=1f4ac]", "\xe2\x9c\xa8" => "[emoji=2728]", "\xe2\x9c\xb4" => "[emoji=2734]", "\xe2\x9c\xb3" => "[emoji=2733]", "\xe2\x9a\xaa" => "[emoji=26aa]", "\xe2\x9a\xab" => "[emoji=26ab]", "\xf0\x9f\x94\xb4" => "[emoji=1f534]", "\xf0\x9f\x94\xb5" => "[emoji=1f535]", "\xf0\x9f\x94\xb2" => "[emoji=1f532]", "\xf0\x9f\x94\xb3" => "[emoji=1f533]", "\xe2\xad\x90" => "[emoji=2b50]", "\xe2\xac\x9c" => "[emoji=2b1c]", "\xe2\xac\x9b" => "[emoji=2b1b]", "\xe2\x96\xab" => "[emoji=25ab]", "\xe2\x96\xaa" => "[emoji=25aa]", "\xe2\x97\xbd" => "[emoji=25fd]", "\xe2\x97\xbe" => "[emoji=25fe]", "\xe2\x97\xbb" => "[emoji=25fb]", "\xe2\x97\xbc" => "[emoji=25fc]", "\xf0\x9f\x94\xb6" => "[emoji=1f536]", "\xf0\x9f\x94\xb7" => "[emoji=1f537]", "\xf0\x9f\x94\xb8" => "[emoji=1f538]", "\xf0\x9f\x94\xb9" => "[emoji=1f539]", "\xe2\x9d\x87" => "[emoji=2747]", "\xf0\x9f\x92\xae" => "[emoji=1f4ae]", "\xf0\x9f\x92\xaf" => "[emoji=1f4af]", "\xe2\x86\xa9" => "[emoji=21a9]", "\xe2\x86\xaa" => "[emoji=21aa]", "\xf0\x9f\x94\x83" => "[emoji=1f503]", "\xf0\x9f\x94\x8a" => "[emoji=1f50a]", "\xf0\x9f\x94\x8b" => "[emoji=1f50b]", "\xf0\x9f\x94\x8c" => "[emoji=1f50c]", "\xf0\x9f\x94\x8d" => "[emoji=1f50d]", "\xf0\x9f\x94\x8e" => "[emoji=1f50e]", "\xf0\x9f\x94\x92" => "[emoji=1f512]", "\xf0\x9f\x94\x93" => "[emoji=1f513]", "\xf0\x9f\x94\x8f" => "[emoji=1f50f]", "\xf0\x9f\x94\x90" => "[emoji=1f510]", "\xf0\x9f\x94\x91" => "[emoji=1f511]", "\xf0\x9f\x94\x94" => "[emoji=1f514]", "\xe2\x98\x91" => "[emoji=2611]", "\xf0\x9f\x94\x98" => "[emoji=1f518]", "\xf0\x9f\x94\x96" => "[emoji=1f516]", "\xf0\x9f\x94\x97" => "[emoji=1f517]", "\xf0\x9f\x94\x99" => "[emoji=1f519]", "\xf0\x9f\x94\x9a" => "[emoji=1f51a]", "\xf0\x9f\x94\x9b" => "[emoji=1f51b]", "\xf0\x9f\x94\x9c" => "[emoji=1f51c]", "\xf0\x9f\x94\x9d" => "[emoji=1f51d]", "\xe2\x9c\x85" => "[emoji=2705]", "\xe2\x9c\x8a" => "[emoji=270a]", "\xe2\x9c\x8b" => "[emoji=270b]", "\xe2\x9c\x8c" => "[emoji=270c]", "\xf0\x9f\x91\x8a" => "[emoji=1f44a]", "\xf0\x9f\x91\x8d" => "[emoji=1f44d]", "\xe2\x98\x9d" => "[emoji=261d]", "\xf0\x9f\x91\x86" => "[emoji=1f446]", "\xf0\x9f\x91\x87" => "[emoji=1f447]", "\xf0\x9f\x91\x88" => "[emoji=1f448]", "\xf0\x9f\x91\x89" => "[emoji=1f449]", "\xf0\x9f\x91\x8b" => "[emoji=1f44b]", "\xf0\x9f\x91\x8f" => "[emoji=1f44f]", "\xf0\x9f\x91\x8c" => "[emoji=1f44c]", "\xf0\x9f\x91\x8e" => "[emoji=1f44e]", "\xf0\x9f\x91\x90" => "[emoji=1f450]", ]; if($type=='show'){ $imageDomain = 'emoji'; return preg_replace_callback('/\[emoji=(\w+)\]/i',function($m) use($imageDomain){ return '<img src="'.$imageDomain.'/0x'.$m[1].'.png"/>'; },$content); }else{ $tmp = str_replace(array_keys($emoji), $emoji, $content); return preg_replace('/[\x{1F000}-\x{1FFFF}]/u', '', $tmp); } }
$emoji数组中key为16进制数据,value对应emoji的unicode(emoji=后面的内容),而这些unicode都是已存在的emoji图片的名称,我已收集了846个emoji图片
以后想添加新的emoji图片时,请在$emoji数组中添加对应的十六进制和bbcode即可
测试代码(我的数据库是utf8,存不了emoji字符,我就不贴出来了,你们就自己输入emoji测试吧,哈哈)
echo '原字符串<br>'; echo $str; echo '<hr>'; echo '转换为 bbcode<br>'; $bbcodeStr = emoji($str); echo $bbcodeStr ; echo '<hr>'; echo '转换为 emoji<br>'; echo emoji($bbcodeStr,'show');
效果图
在存入数据库之前,执行$bbcodeStr = emoji($str);保存$bbcodeStr即可
在显示数据之前,执行emoji($bbcodeStr,'show');直接显示即可
方法中的$imageDomain改为你对于的图片域名即可
对应的emoji表情下载,CSDN下载