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 閱讀(220) 評論(0)  編輯  收藏 所屬分類: JAVA
          主站蜘蛛池模板: 塔河县| 合水县| 麻栗坡县| 西乌珠穆沁旗| 镇远县| 泽州县| 同心县| 涟水县| 治多县| 巍山| 台州市| 安多县| 班玛县| 伊宁县| 灵台县| 杂多县| 安塞县| 怀集县| 宜阳县| 永济市| 伊宁市| 邵阳县| 襄城县| 文安县| 阳江市| 哈尔滨市| 呼图壁县| 电白县| 平利县| 广德县| 炉霍县| 闻喜县| 婺源县| 凌云县| 奉化市| 德化县| 滨州市| 固始县| 乐陵市| 县级市| 湟源县|