Poperties Editor 插件------自动解决ApplicationResources.properties中汉字乱码问题 写道
今日做了个struts验证小程序,显示ApplicationResources.properties中汉字提示信息,结果显示乱码。怎么也没解决,后来发现一个插件Poperties Editor,只要装上,就可以自动解决这个问题。下面找了安装方法:
Poperties Editor介绍
一个在编辑完成后可以将资源文件中的中文编码格式转换为unicode编码的插件,在开发国际化应用程序的时候非常有用
http://propedit.sourceforge.jp/eclipse/updates/
主页为:
http://propedit.sourceforge.jp/index_en.html
安装方法:在线安装Poperties Editor
启 动eclipse,点菜单Help -> SoftWare Updates -> find and install->选中Search for new features to install ->next->点击 New Remote site->给这个更新站点取个名字如:luanma,url填写http://propedit.sourceforge.jp/eclipse/updates即可。->点击ok ->选中刚才新加的站点名称,点击finish->他会自动找出与你所用的eclipse版本相适应的插件全部选中->后面只要选择 install all即可
->最后会提示你重起你的eclipse
所有的properties文件名的前面都有一个绿色的p字.见下图:
.这就表明ok
注意:当你安装完之后,那个properties文件里有中文,你编译之后它自动就会转化了。
这是在网络上找到的,有好几篇文章都是一样的,不知道出自谁的文章了,所以暂时没有找到原文,希望作者看到后能联系我。我会给出原始地址的。
还有一个类似的比较好的插件是:
ResourceBundle Editor
主页为:http://sourceforge.net/projects/eclipse-rbe/
for Eclipse 3.x暂时的最新版本为0.7.7版本
说明:
ResourceBundle Editor是一个用于编辑本地化的属性文件(localized properties files)。
它让你通一个屏幕就能够同时管理所有相关联属性文件中的key/value信息。
它所具有的功能包括:自动为Keys分类,能够提示丢失掉的,重复的,相似的values等.
在http://blog.chinaunix.net/u1/57282/showart_469053.html
中写道第二种方法
ApplicationResources.properties中文汉字解决方案 写道
方法二:
在jdk的bin文件夹里有个专门转unicode的应用程序 native2ascii.exe
具体操作如下:
1、把你要转换的文字写到一个文件里,如c:\test.txt
2、在cmd方式中转到bin目录,如C:\j2sdk1.4.2_04\bin
3、输入命令 native2ascii c:\test.txt > c:\out.txt
4、将out.txt里对应的编码替代原文件的编码即可
当然也可以这样
native2ascii -encoding gb2312 ApplicationResources.properties ApplicationResources_zh.properties
分享到:
相关推荐
解决Struts中ApplicationResources.properties文件不支持中文问题
NULL 博文链接:https://jzgl-javaeye.iteye.com/blog/390873
activiti和springboot整合只使用application.properties配置文件,解决了jdbc长时间待机连接被收回报错。使用springProcessEngineConfiguration对activiti管理
IDEA WEB项目启动不加载application.properties配置文件,yml配置文件是否也会不加载未尝试,如果有遇到的可以尝试一下。
application.properties 之配置大全---- application.properties 之配置大全
springBoot常用application.properties基础配置大全
可以编辑资源文件中的中文,不用再看一堆Unicode码了。 可用于eclipse 3.X ... 例:在ApplicationResources.properties上点右键,open with选PropertiesEditor就可以在ApplicationResources.properties写中文了
ApplicationResources.txt
application-prod.properties
spring boot 配置文件
SpringBoot项目的application.properties配置文件
springboot该项目配置文件,application.properties,需要的可以参考一下,需要springboot前后端分离,增删改查项目的可以私聊我
CodeResource\src\com\publish\shop\ApplicationResources.txt.bak
Spring-Boot-application.properties 描述,中文解释springboot 的application.properties 中每个配置是什么意思。
2_application.properties
主要介绍了Spring Boot中配置文件application.properties使用及spring boot读取application.properties文件的方式,需要的朋友参考下吧
application.xml配置文件详解 application.xml配置文件详解 application.xml配置文件详解