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 阅读(206) 评论(0)  编辑  收藏 所属分类: JAVA

只有注册用户登录后才能发表评论。


网站导航: