<link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-d7e2a68c7c.css">
<div class="htmledit_views" id="content_views">
<p><span style="font-size:18px;">首先,解决.properties文件中的中文编辑问题,我们发现,在.properties文件中输入的中文变成了这个样子:</span></p><p><span style="font-size:18px;"><br></span></p><p><span style="font-size:18px;"><img src="https://img-blog.csdn.net/20180103104530243?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2VpeGluXzM2MzgwNTE2/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""><br></span></p><p><span style="font-size:18px;"><br></span></p><p><span style="font-size:18px;"><br></span></p><p><span style="font-size:18px;">这是eclipse的.properties文件,默认的编码方式是iso-8859-1,这里可以修改编码为UTF-8,方法是:</span></p><p><span style="font-size:18px;"><br></span></p><p><span style="font-size:18px;"><img src="https://img-blog.csdn.net/20180103104846972?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2VpeGluXzM2MzgwNTE2/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""><br></span></p><p><span style="font-size:18px;"><br></span></p><p><span style="font-size:18px;"><br></span></p><p><span style="font-size:18px;">图很明显了,无需多言。唯一需要强调的是最后一定点击Update,此时,在<span style="font-size:18px;">.properties文件</span>中写中文,显示中文已经没有问题了。但是,之前的内容不会变,只有设置之后新加的中文没问题了。</span></p><p><span style="font-size:18px;"><br></span></p><p><span style="font-size:18px;">我们要看之前的中文内容怎么解决?</span></p><p><span style="font-size:18px;">可以安装Properties Editor插件,方法:</span></p><p><span style="font-size:18px;">Help --> Install New Software -->输入:http://propedit.sourceforge.jp/eclipse/updates/-->回车</span></p><p><span style="font-size:18px;"><br></span></p><p><span style="font-size:18px;"><img src="https://img-blog.csdn.net/20180103105540618?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2VpeGluXzM2MzgwNTE2/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""><br></span></p><p><span style="font-size:18px;"><br></span></p><p><span style="font-size:18px;"><br></span></p><p><span style="font-size:18px;">下载过程中的警告忽略,完成后会提示重启eclipse,重启,结束后<span style="font-size:18px;"><span style="font-size:18px;">.properties</span></span>文件的图标就变了,加了个绿色的P,如果有变化说明你的控件安装成功了,此时文件右击 -> Open With -> PropertiesEditor,打开<span style="font-size:18px;"><span style="font-size:18px;">.properties文件</span></span>,发现之前的中文内容也可以正确显示了。<br></span></p> </div>
</div>
<script>
(function(){
function setArticleH(btnReadmore,posi){
var winH = $(window).height();
var articleBox = $("div.article_content");
var artH = articleBox.height();
if(artH > winH*posi){
articleBox.css({
'height':winH*posi+'px',
'overflow':'hidden'
})
btnReadmore.click(function(){
if(typeof window.localStorage === "object" && typeof window.csdn.anonymousUserLimit === "object"){
if(!window.csdn.anonymousUserLimit.judgment()){
window.csdn.anonymousUserLimit.Jumplogin();
return false;
}else if(!currentUserName){
window.csdn.anonymousUserLimit.updata();
}
}
articleBox.removeAttr("style");
$(this).parent().remove();
})
}else{
btnReadmore.parent().remove();
}
}
var btnReadmore = $("#btn-readmore");
if(btnReadmore.length>0){
if(currentUserName){
setArticleH(btnReadmore,3);
}else{
setArticleH(btnReadmore,1.2);
}
}
})()
</script>
</article>