你的字符是怎么转换的?
jsp中有没加上:<%@ page contentType="text/html;charset=GB2312" %>?

解决方案 »

  1.   

    我的jsp中的其他中文字符显示都正常,只是在输出到图片上时出现乱码,另外在windows2000下显示正常!
    程序如下: 请指教!!!      Graphics g=image.getGraphics();
          ....
          g.drawString(enc_gb(chartValuesName[i]),                   chartMargin[0]+i*pace,                   chartRect[1]+15+chartMargin[1]);      }
       .....
       public String enc_gb(String s){        try{                String temp_p = s;                byte[] temp_t = temp_p.getBytes("iso8859-1");                String temp = new String(temp_t);                return temp_p;        }        catch(Exception e){                return null;        }  }