求助!Oracle中读取二进制字段里的数据乱码,其他类型字段有中文却不会 我有一个二进制类型的(blob)字段 在MySQL中读取显示没问题然后我就将查询出的数据插入到Oracle中的某个表再用同样的方法读取出来却是乱码其他字段有中文信息的又不会。请走过路过的朋友帮帮忙,拜谢!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 读取的时候 byte[] fer=rst.getBytes("fm_ser"); System.out.println(new String(fer,"UTF-8"));换GBK也是乱码的 Blob blogObj = rst.getBlob("CONTENT"); if(blogObj!=null){ byte[] content = blogObj.getBytes(1, (int) blogObj.length()); try { news.setContent(new String(content,“UTF-8”)); --这里读取时候指定编码 } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } 几个巨难的Sql优化题,请大家帮忙!(下午结贴) Io 异常: The Network Adapter could not establish the connection controlfile oracle 系统表 主键的问题 各位:orcale8.1.7 怎么创建读blob字段的存储过程? 字符和时间函数问题 这两个触发器合并时出错??为什么??? sqlplus 里面有命令查看存储过程吗? oracle有类似于sqlserver profiler之类的功能吗 从sql2008取数据到oracle oracle安装出现以下错误 如何解决? delphi如何链接Oracle数据库?
byte[] fer=rst.getBytes("fm_ser");
System.out.println(new String(fer,"UTF-8"));
换GBK也是乱码的
Blob blogObj = rst.getBlob("CONTENT");
if(blogObj!=null){
byte[] content = blogObj.getBytes(1, (int) blogObj.length());
try {
news.setContent(new String(content,“UTF-8”)); --这里读取时候指定编码
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}