struts中使ApplicationResources.properties支持中文
2005-10-24 17:12
423 查看
使ApplicationResources.properties支持中文
建立一个ApplicationResources_ISO.properties文件,把应用程序用的message都写进去,
然后在dos下执行这个命令,是jdk/bin中的cmd:
native2ascii -encoding gb2312 ApplicationResources_ISO.properties ApplicationResources.properties
这样就会将ISO编码的ApplicationResources转换成GB2312编码的格式了,同时保存到
ApplicationResources.properties。这个文件需要保存在 /WEB-INF/classes目录中
native2ascii这个工具是jdk自带的一个东东,所以如果path都设定正确就可以直接运行了,
你可以在$java_home$/bin下找到他。
转换后的中文类似于这个样子:
iso 格式下 :tj.type=商品车类型
gb2312格式下 :tj.type=/u5546/u54c1/u8f66/u7c7b/u578b
建立一个ApplicationResources_ISO.properties文件,把应用程序用的message都写进去,
然后在dos下执行这个命令,是jdk/bin中的cmd:
native2ascii -encoding gb2312 ApplicationResources_ISO.properties ApplicationResources.properties
这样就会将ISO编码的ApplicationResources转换成GB2312编码的格式了,同时保存到
ApplicationResources.properties。这个文件需要保存在 /WEB-INF/classes目录中
native2ascii这个工具是jdk自带的一个东东,所以如果path都设定正确就可以直接运行了,
你可以在$java_home$/bin下找到他。
转换后的中文类似于这个样子:
iso 格式下 :tj.type=商品车类型
gb2312格式下 :tj.type=/u5546/u54c1/u8f66/u7c7b/u578b
相关文章推荐
- 使ApplicationResources.properties支持中文
- JSP applicationResources.properties 支持中文
- 解决struts ApplicationResources.properties文件不能写中文问题
- struts中ApplicationResources.propertices文件的中文-unicode转换方法
- 使Struts 中的 properties属性的文件支持中文的插件的安装方法
- struts properties 文件不支持中文
- ApplicationResources.properties输入 中文.txt
- 解决Struts中ApplicationResources_properties文件不支持中文问题
- 使Struts 中的 properties属性的文件支持中文的插件的安装方法
- 用java SDK/bin目录下的native2ascii将ApplicationResources.properties中的中文转化成unicode码实现国际化
- 解决JSP ApplicationResource.Properties不支持中文的方法
- 如何在ApplicationResources.properties中输入中文
- (struts1)ApplicationResources.properties
- ApplicationResources.properties中输入中文
- 如何在ApplicationResources.properties中输入中文
- ApplicationResources.properties文件中文乱码问题的解决
- com.test.struts/ApplicationResources.properties
- 如何在ApplicationResources.properties中输入中文
- structs的ApplicationResources.properties
- html:errors标签使用(需配置资源文件ApplicationResources.properties)