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; } }
|