cn.zcltd.btg.sutil.unicode.NotAsciiUnicodeConverter Maven / Gradle / Ivy
package cn.zcltd.btg.sutil.unicode;
/**
* Kit:Json Unicode编码
*/
public class NotAsciiUnicodeConverter extends UnicodeConverter {
public static final NotAsciiUnicodeConverter me = new NotAsciiUnicodeConverter();
/**
* 是否忽略:
* 除ascii可显示字符外的其他字符全部进行编码
*
* @param c 当前处理的字符
* @return 忽略返回true,否则返回false
*/
public boolean isPass(char c) {
int ascii = (int) c;
return ascii >= 33 && ascii <= 126;
}
}