mysql+jsp时 longtext类型 的乱码 问题????
我在jsp 中 引用mysql数据库中的 数据 当数据为varchar类型的时候 用以下的方法可以 得到正常的文字 当类型为longtext就不行了,哪位大虾知道 当类型为longtext 应该如何处理?谢谢拉
public String ex_chinese(String str){
if(str==null){
str ="" ;
}
else{
try {
str = new String(str.getBytes("iso-8859-1"),"gb2312") ;
}
catch (Exception ex) {
}
}
return str ;
}