getParameter()来的值进行一下中文转换就好了

解决方案 »

  1.   

    getParameter()来的值进行一下中文转换就好了????????怎么进行中文转换呀?对不起,呵呵,我不会呀
      

  2.   

    我做了一个这个:
        public StringTools()
        {
        }    public static String GB2Unicode(String s)
        {
            String s1 = null;
            if(s == null || s.trim().equals(""))
                return s;
            try
            {
                s1 = new String(s.getBytes("GBK"), "ISO8859_1");
            }
            catch(UnsupportedEncodingException unsupportedencodingexception)
            {
                System.err.println(unsupportedencodingexception);
            }
            return s1;
        }
    然后调用str.GB2Unicode(name);
    可是还是出现????
      

  3.   

    s1 = new String(s.getBytes("ISO8859-1"),"GB2312");
    试试看,我用这个方法可以,是JSP插入数据到SQLSERVER
      

  4.   

    为什么我在英文的win2k中使用jdbc,不管对access还是mysql操作,写入读出都没有发生中文乱码的问题?我没有对其进行编码,数据库都是英文版的。似乎英文版的对中文的兼容性要好?