opencc4j
opencc4j copied to clipboard
字符串中存在繁体和其它符号,isTraditional给出结果为false
public static void main(String[] args) {
String s = "( 台灣 )";
String simple = ZhConverterUtil.toSimple(s);
System.out.println(simple);
System.out.println(ZhConverterUtil.isTraditional(s));
}
输出结果:
( 台湾 )
false
看了下源码,只要有非中文的,直接返回false了。感觉校验前,需要对校验的字符串进行处理下