首先修改webwork.properties:
webwork.locale
=
zh_CN
webwork.i18n.encoding = GBK
修改native2ascii的编码
修改页面:
搞定了!这个问题居然折腾我好大一会儿,一开始我以为用utf-8就行了,谁知道就是不灵:(
webwork i18n:http://www.opensymphony.com/webwork/wikidocs/Internationalization.html
webwork.i18n.encoding = GBK
修改native2ascii的编码
<
target
name
="i18n"
>
< native2ascii
encoding ="GBK"
src ="${src.java.dir}"
dest ="${classes.dir}"
includes ="**/*_zh_CN.properties" />
< copy
todir ="${classes.dir}" >
< fileset dir ="${src.java.dir}" >
< exclude name ="**/*.java" />
< exclude name ="**/*_zh_CN.properties" />
</ fileset >
</ copy >
</ target >
< native2ascii
encoding ="GBK"
src ="${src.java.dir}"
dest ="${classes.dir}"
includes ="**/*_zh_CN.properties" />
< copy
todir ="${classes.dir}" >
< fileset dir ="${src.java.dir}" >
< exclude name ="**/*.java" />
< exclude name ="**/*_zh_CN.properties" />
</ fileset >
</ copy >
</ target >
修改页面:
<%
@ page contentType
=
"
text/html; charset=GBK
"
%>
搞定了!这个问题居然折腾我好大一会儿,一开始我以为用utf-8就行了,谁知道就是不灵:(
webwork i18n:http://www.opensymphony.com/webwork/wikidocs/Internationalization.html