ITeye博客

native2ascii转换中文properties文件

harbey · 2009-04-13 20:37 · Java · Markdown

问题描述: 在property文件中的中文,如果不经过encode的话,会以乱码的形式呈现; 解决办法: 可以通过${java_home}/jdk/bin下的native2ascii.exe来encode中文; 例如: 在dos下输入: native2ascii ApplicationResources.properties ApplicationResources_zh_CN.properties 这样就将中文encode成类似如下的字符串: errors.invalid={0} \u65E0\u6548\u3002

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。