try
----------
<%
String str =getChinese((String)request.getParameter("word"))
%>
<%!
  public String getChinese(String str) { //取汉字
    try {
      String temp_p = str;
      byte[] temp_t = temp_p.getBytes("ISO8859-1");
      String temp = new String(temp_t);
      return temp;
    }
    catch (Exception e) {
      e.printStackTrace();
    }
    return "";
  }
%>

解决方案 »

  1.   

    function popup(word){
      var word=word;
      var showall=window.open("word.jsp?word="+encodeURI(word),"allcontent","toolbar=no,width=600,height=600,top="+(screen.height-600)/2+",left="+(screen.width-600)/2+";,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
    }
      

  2.   

    word里不能以有单引号和双引号吗?
      

  3.   

    再试试看,如果控制台也是乱码,那就要另想办法
    -----------------
    <%@page pageEncoding="gb2312" %>
    <meta http-equiv="Content-type" content="text/html;charset=gb2312">
    <%
    String str = getChinese((String)request.getParameter("word"));
    System.out.println(str);
    out.println(str);
    %>
    <%!
      public String getChinese(String str) { //取汉字
        try {
          String temp_p = str;
          byte[] temp_t = temp_p.getBytes("ISO8859-1");
          String temp = new String(temp_t);
          return temp;
        }
        catch (Exception e) {
          e.printStackTrace();
        }
        return "";
      }
    %>
      

  4.   

    cxz7531(大花猫) 的方法可以了。謝謝。每個人都有分。