用这个试试:
 
   String a = "adfafd";
   String b = new String(a.getBytes("8859_1"),"GB2312");如果还是不行,用:
 
   String a = "adfafd";
   String b = new String(a.getBytes("GB2312"),"8859_1");

解决方案 »

  1.   

    public static String UnicodeToChinese(String s){
      try{
         if(s==null||s.equals("")) return "";
         String newstring=null;
         newstring=new String(s.getBytes("ISO8859_1"),"gb2312");
         return newstring;
        }
      catch(UnsupportedEncodingException e)
      {
      return s;
      }
      }public static String ChineseToUnicode(String s){
      try{
      if(s==null||s.equals("")) return "";
      String newstring=null;
      newstring=new String(s.getBytes("gb2312"),"ISO8859_1");
       return newstring;
      }
      catch(UnsupportedEncodingException e)
      {
      return s;
     }
      }
      

  2.   

    我是用oracle8i自己的工具在表里面直接输进去的
      

  3.   

    如果你直接在oracle数据库里面输入中文,都不能正常显示就是oracle的中文问题了,否则可能就是你程序插如的数据没有转换而出现的乱码,这就要在你入库前,调用我上面给你的方法。
    假如你的client是jsp:
    也可以在jsp中加入:
    <%@ page contentType="text/html; charset=gb2312" %>来解决中文问题。
    是servlet:
     public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType(CONTENT_TYPE);
    response.setContentType("text/html; charset=gb2312");
      

  4.   

    是你的oracle没有安装多语言支持。
      

  5.   

    Oracle8i,提供的工具,看需要知道server端服务器的编码,默认的。然后看你的client是否一致。
      

  6.   

    我是在数据库里输入中文,在数据库里就显示为乱码,但是同一个oracle软件中的另外一个数据库确实正常的
      

  7.   

    我是在数据库里输入中文,在数据库里就显示为乱码,但是同一个oracle软件中的另外一个数据库确是正常的
      

  8.   

    在将数据存入数据库之前,先用worldheart的方法将数据转换一下
    然后在 insert into table(...)value(...)