java中的非英文字体(字符)插入失败

时间:2014-01-29 07:37:21

标签: java hibernate jsp

将hibernate属性设置如下,

 hibernate.connection.useUnicode=true
 hibernate.connection.characterEncoding=UTF-8
 hibernate.connection.CharSet=UTF-8

以及以下标签已添加到jsp页面,

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html" charset=UTF-8>

当我直接插入非英文字体并从数据库中检索它时,我可以在JSP页面中显示非英文字体。但是从视图到模型非英文字体(字符)的输入显示为?,因此插入失败。

注意:使用的数据库是Mysql

0 个答案:

没有答案