今天整了一天了。发下感慨.
1.我的数据库,表都是utf-8
2.后来我在resin中也加上了
<web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
<!--
- Administration application /resin-admin
-->
<character-encoding>utf-8</character-encoding>
<prologue>
<resin:set var="resin_admin_external" value="false"/>
<resin:set var="resin_admin_insecure" value="true"/>
</prologue>
</web-app>
还是不行
3.最后查到:
url=jdbc:mysql://localhost:3306/7cskycms?useUnicode=true&characterEncoding=UTF-8
这样才行
url=jdbc:mysql://localhost:3306/7cskycms?characterEncoding=UTF-8