@@ -0,0 +1,1454 @@
+package com.wemote.scorpio.modules.utils;%0A%0Aimport com.google.common.collect.Range;%0Aimport org.apache.commons.lang.StringUtils;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A/**%0A * @author: jayon.xu@gmail.com%0A */%0Apublic class EmojiUtils %7B%0A%0A    private static Logger logger = LoggerFactory.getLogger(EmojiUtils.class);%0A%0A    static Range%3CCharacter%3E utf84ByteRange = Range.closed(%22%5Cu1F601%22.charAt(0), %22%5Cu1F64F%22.charAt(0));%0A%0A    //%E6%8A%8A%E8%B6%85%E8%BF%87utf-8%E5%AD%97%E8%8A%82%E7%BC%96%E7%A0%81%E7%9A%84%E5%AD%97%E7%AC%A6%E5%8E%BB%E6%8E%89%0A    //%E5%8F%82%E8%A7%81: http://cenalulu.github.io/linux/character-encoding/%0A    //%E6%89%80%E8%B0%93Emoji%E5%B0%B1%E6%98%AF%E4%B8%80%E7%A7%8D%E5%9C%A8Unicode%E4%BD%8D%E4%BA%8E%5Cu1F601-%5Cu1F64F%E5%8C%BA%E6%AE%B5%E7%9A%84%E5%AD%97%E7%AC%A6%0A    public static String replaceUtf84byte(String str, char replaceChar) %7B%0A%0A        if (StringUtils.isBlank(str)) %7B%0A            return StringUtils.EMPTY;%0A        %7D%0A%0A        char%5B%5D chars = str.toCharArray();%0A        for (int i = 0; i %3C chars.length; i++) %7B%0A            if (Character.isSurrogate(chars%5Bi%5D)) %7B%0A                logger.warn(chars%5Bi%5D + %22char is surrogate code unit, utf-8 is 4 bytes, replace it with %22 + replaceChar);%0A                chars%5Bi%5D = replaceChar; //%E6%9B%BF%E6%8D%A2%E6%88%90%E7%A9%BA%E6%A0%BC%0A            %7D else if (utf84ByteRange.contains(chars%5Bi%5D)) %7B%0A                logger.warn(chars%5Bi%5D + %22char is in %5C%5Cu1F601-%5C%5Cu1F64F, utf-8 is 4 bytes, replace it with %22 + replaceChar);%0A                chars%5Bi%5D = replaceChar; //%E6%9B%BF%E6%8D%A2%E6%88%90%E7%A9%BA%E6%A0%BC%0A            %7D%0A        %7D%0A%0A        return new String(chars);%0A    %7D%0A%0A    public static String replaceUtf84byteWithBlank(String str) %7B%0A        return replaceUtf84byte(str, ' ');%0A    %7D%0A%0A%7D%0A

Add filter emoji utils.