读书人

String 字符编码有关问题

发布时间: 2012-09-11 10:49:03 作者: rapoo

String 字符编码问题
1.
由客户端发送来的数据,在server解析的时候,利用

Pattern p = Pattern.compile(pattern);
Matcher m = p.matcher(str);
if(!m.matches()){
log.debug("The result is :" + m.matches());

}

进行正则校验的时候出错。
期间debug接受的数据,并自写main函数测试都没有问题。

读书人网 >编程

热点推荐