posts - 189,comments - 115,trackbacks - 0
          Diary 數據庫中文寫入時的轉換程序

          JAVA? SQL SERVER 2000數據庫中文寫入時的轉換程序:

          package crm;
          public class tran{
          public?String tran(String chi)
          ?{
          ??String result = null;
          ?????????????? byte temp [];
          ?????????????? try
          ?????????????? {
          ?????????????????????? temp=chi.getBytes("iso-8859-1");
          ????????????????????? result = new String(temp);
          ??????????????? }
          ??????????????? catch(java.io.UnsupportedEncodingException e)
          ??????????????? {
          ??????????????????????? System.out.println (e.toString());
          ??????????????? }
          ???return result;
          ?}
          ?
          }

          posted on 2006-03-25 18:45 MEYE 閱讀(219) 評論(0)  編輯  收藏 所屬分類: JAVA
          主站蜘蛛池模板: 红桥区| 辽中县| 萨嘎县| 改则县| 拜泉县| 象州县| 疏附县| 万全县| 黑河市| 汶上县| 额济纳旗| 宝坻区| 勐海县| 沁阳市| 东乡县| 淮安市| 福贡县| 常宁市| 武安市| 四川省| 乌审旗| 福建省| 宜春市| 丹凤县| 五原县| 汤阴县| 资阳市| 高邑县| 平遥县| 清水河县| 宁武县| 抚顺县| 五常市| 岢岚县| 景谷| 宜兰县| 维西| 阳江市| 长岭县| 中宁县| 广元市|