Pattern emoji = Pattern.compile("[\ud83c\udc00-\ud83c\udfff]|[\ud83d\udc00-\ud83d\udfff]|[\u2600-\u27ff]|" +
"[\ud83e\udd00-\ud83e\uddff]|[\u2300-\u23ff]|[\u2500-\u25ff]|[\u2100-\u21ff]|[\u0000-\u00ff]|[\u2b00-\u2bff]|[\u2d06]|[\u3030]"
,Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE ) ;
Matcher matcher = emoji.matcher(song);
Matcher matcher2 = emoji.matcher(songer);
if(matcher.find()||matcher2.find()){
Toast.makeText(mActivity, R.string.bell_diy_save_illegal_name, 0).show();
}else{
//Gionee <zhangjinbiao> <2016-12-26> modify for <50238> begin
// String strUtf_16 = new String(songer.getBytes());
//byte[] bytes = strUtf_16.getBytes(StandardCharsets.UTF_16);
//char[] charArr
Android过滤emoji表情
最新推荐文章于 2024-06-19 00:42:56 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)