在插入之前先对字符串进行内码转换,例如
String str=new String("测试");
byte[] by=str.getBytes();
String insertStr=new String(by,"ISO8859_1");//这里的内码要换成跟你数据库里的相同然后把insertStr 插入就行了
String str=new String("测试");
byte[] by=str.getBytes();
String insertStr=new String(by,"ISO8859_1");//这里的内码要换成跟你数据库里的相同然后把insertStr 插入就行了
(用javac编译)
2、设置oracle的字符集为GBK。