为什么从mysql读出中文数据到页面显示是乱码
我是用struts+hibernate架构,在struts-config.xml中的数据源设成了<set-property property="url"
value="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8" />
页面上也加了<%@ page contentType="text/html;charset=UTF-8" language="java"%>
页面中输上的中文没有问题,但从mysql中读取中文时就会出现乱码
我用的是mysql5.0
请帮忙解决,谢谢!