补充说明:Sql server 2000的数据库已经解决了乱码的问题,如果服务器端存储的数据为中文,那么
在浏览器端显示的就是中文,问题主要在于:
浏览器端提交给数据库服务器的是乱码,这个可以完全确定,那么说其实是Tomcat编译提交给数据库的
是乱码

解决方案 »

  1.   

    1. 因为操作系统语言不同,你不能让你的Web应用使用默认编码,你应该指定为 GB2312 或者 UTF-8 等。2. Windows2000英文版一定要支持你所指定的那个编码,比如,安装中文语言包(好像是叫做亚洲语言支持的一个东西)。
      

  2.   

    public static String gb2Iso(String gbStr)
    {
    String str = null;
    try{
    str = new String(gbStr.getBytes("GBK"),"8859_1");
    }catch(Exception e){}
    return str;
    }
    public static String iso2Gb(String Str)
    {
    String str = null;
    try{
    str = new String(Str.getBytes("8859_1"),"GBK");
    }catch(Exception e){}
    return str;
    }