数据库为mysql 4.0 用的mysql control centerjsp页面中,只有显示数据库中数据的汉字显示为"??" 其他汉字正常.

解决方案 »

  1.   


    struts结构 
    在struts-config.xml文件中的. <set-property property="url"
    value="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=GBK" />在eclipse下用run就能通过.在IE下就是不行.
      

  2.   

    在console Monitor下 显示 
    fatal erorr 
    The reference to entity"characterEncoding" must end with ";" delimiter..
    这是什么错误?????
      

  3.   

    能过MySQL Command Line Client看,是否显示乱码??
      

  4.   

    你意思在dos模式下是否显示乱码? 在dos下显示正常.
      

  5.   

    我发现我的问题关键出在
    <set-property property="url"
    value="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=GBK" />
    这一句好是出问题.如果不出问题.那么显示就是正常的了.
      

  6.   

    别沉下去啊,在线着急等.
    jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=GBK
    这句url在eclpse下就没问题.
    在tomcat下就有问题.
      

  7.   

    我也遇到这个问题,我的数据库字符集是latin1的
      

  8.   

    The reference to entity"characterEncoding" must end with ";" delimiter..
    错误是说你少写了个;
    你的乱码要加转换的
    getbutton=new String(getbutton.getBytes("ISO8859_1"), "gb2312");
      

  9.   

    取时试试这个方法,,(数据录入和输出调用编码一不至)    public static String  chn(String en)
        {
        try{
        String w_b=new String(en.getBytes("ISO8859_1"),"GBK");    if (en.length()>w_b.length())
        en=w_b;
        }catch(Exception e){}
        return en;
        }