http://www.csdn.net/expert/topic/1065/1065682.xml?temp=.5636408

解决方案 »

  1.   

    http://www-900.ibm.com/developerWorks/cn/java/jsp_dbcsz/index.shtml
    public String FormatConvert(String from)
    {   try{
           byte[] b = from.getBytes("iso8859-1");
           return new String(b,"gb2312");
        }catch(Exception e){}
        return null;
    }
      

  2.   

    借个地方用用:
    http://www.csdn.net/expert/topic/1092/1092740.xml?temp=2.317446E-02
      

  3.   

    还有:1、静态的写在jsp页面中的中文居然出来是乱码!加了<meta http-equiv="Content-Type" content="text/html;charset=GB2312">啊。
    文件头改为:
    <%@ page contentType="text/xml;charset=iso8859_1"%>
      

  4.   

    翻以前的帖子,jsp的中文问题99.9%已经解决。
      

  5.   

    http://www.csdn.net/expert/topic/1065/1065682.xml?temp=.5636408
      

  6.   

    你可以试一下在.jsp中直接用下面这个函数:<%!
    //转换为中文(在浏览器中显示中文)
    public String getStr(String str)
    {
    try
    {
      String temp_p=str;
      byte[] temp_t=temp_p.getBytes("GBK");
      String temp=new String(temp_t,"ISO8859_1");
      return temp;
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
    return "null";
    }
    %>
      

  7.   

    嗨,您解决乱码问题没有啊?
    我前几天也遇到同样的问题,试了很多种方法都不行,后来参考了http://www.csdn.net/expert/topic/1065/1065682.xml?temp=.5636408
    所说的方法,把乱码搞好了
    您不妨也认真参考一下