js向action中传参中文乱码

contentUrl = "maintenancemanage!showCertainContent.action?time=" + time + "&menuQuerySelect=" + currentSelectMenu.id

       + "&areaId=" + unitId + "&certainType=area&areaName=" + encodeURI(unitName);





public void setAreaName(String areaName) {
String tmp = null;
try {
tmp = new String(areaName.getBytes("iso-8859-1"),"utf-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
this.areaName = tmp;
}

posted on 2012-05-24 11:39  java课程设计例子  阅读(153)  评论(0编辑  收藏  举报