How to deal with the problem of emoji character storage

Reference material:
Emoji characters can be copied directly:
http://emoji.com.tw/emoji/Character
set encoding problem:
http://www.cnblogs.com/cenalulu/p/4251639.htmlSolution

:
put non-UTF- 8 characters are replaced:
message.replaceAll("[^\\u0000-\\uFFFF]", "");

Remove all Chinese characters:
message.replaceAll("[\\u4E00-\\u9FA5]+", " ");

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326663465&siteId=291194637