1、数据库显示到jsp页面乱码问题
blob类型是二进制对象,用String类型接收出现乱码:
我的解决办法:
public void setArticleContent(byte[] articleContent) {
try {
this.articleContent = new String(articleContent,"utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
2、富文本编辑器存储到数据库:用String类型接收数据