老方法,一般入库可以不作任何操作,只要在出库时候new String("内容".getBytes("iso-8859-1"),"gb2312")

解决方案 »

  1.   


      public static String toIso(Object p0) {
        try {
          String p1 = getString(p0);
          byte[] btArr = p1.getBytes("GB2312");
          return new String(btArr,"iso-8859-1");
        } catch(Exception ex) {
          Debug.Debug("StringKit","toIso Error:" + ex.getMessage());
          return "";
        }
      }  public static String toGb(Object p0) {
        try {
          String p1 = getString(p0);
          byte[] btArr = p1.getBytes("iso-8859-1");
          return new String(btArr,"GB2312");
        } catch(Exception ex) {
          Debug.Debug("StringKit","toGb Error:" + ex.getMessage());
          return "";
        }
      }出库和入库分别调用这两个函数。另外,在页面开头加:
    <meta http-equiv="Content-Language" content="zh_cn">
    <meta http-equiv="content-type" content="text/html; charset=gb2312">
      

  2.   

    应该是new String("内容".getBytes("iso-8859-1"),"big5")的说