关于java乱码的一些整理

1:customer.setName(new String(customer.getName().getBytes("ISO-8859-1"),"UTF-8")); 
 (<input type="text" class="inp2" name="customer.name" url="customer!validate" tip="只允许[2-50]个[中文|英文|数字]字符"/><font class="red marLef">*</font>)
 
 
2:customer.setIntention(java.net.URLDecoder.decode(customer.getIntention(), "UTF-8")); 
(正常走action)


3:function CustomerIntention(intention) {
var inten= encodeURI(encodeURI(intention));
window.location.href="crm/track?customer.intention="+inten;
}

猜你喜欢

转载自blog.csdn.net/caisenbinbeida2009/article/details/38491351
今日推荐