new String(request.getParameter("your name").getBytes("ISO8859_1"));

解决方案 »

  1.   

    <% request.setCharacterEncoding("gb2312"); %>
      

  2.   


        public String Tochinese(String str){
        if(str==null){
        str  ="" ;
        }
        else{
            try {
           str = new String(str.getBytes("iso-8859-1"),"gb2312") ;
            }
            catch (Exception ex) {
            }
        }
        return str ;
     }
      

  3.   

    用用这个,马上可以解决。
    <%@ page contentType= "text/html;charset=gb2312" %>
    <%  request.setCharacterEncoding("gb2312");%>