摘要:
/**
* 过滤掉超过3个字节的UTF8字符
* @param text
* @return
* @throws UnsupportedEncodingException
*/
public static String filterOffUtf8Mb4(String text) throws UnsupportedEncodingException {
byte[] bytes = text.getBytes("utf-8");
ByteBuffer buffer = ByteBuffer.allocate(bytes.length);
int i = 0; 阅读全文