- set database's encoding UTF-8
- for each jsp, add <%@ page language="java" contentType="text/html; charset=utf-8" %>
- use native2ascii to convert your resource file from non-unicode encoding to unicode encoding
- native2ascii [-encoding ur file's encoding] sourceFileName destFileName
- native2ascii -encoding gb2312 message_chinese.properties message_zh_CN.properties
- do NOT use any non-unicode chars in ur jsp
- use filter to convert request encoding - request.setCharacterEncoding("UTF-8")
解决struts中文问题
最新推荐文章于 2024-02-07 22:09:49 发布