在Eclipse中同时更改多个文件的文本编码 [英] Change text encoding for multiple files at once in Eclipse

查看:161
本文介绍了在Eclipse中同时更改多个文件的文本编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Eclipse项目中有一些UTF-8 HTML模板,Eclipse会像他们的编码一样处理它们。它说编码是从内容确定。我想强制正确的编码。



我可以强制它为单个文件,但为父文件夹设置编码不会影响其中的文件,因为而不是属性表中的继承选项有从内容确定的东西。



是否可以为项目中的所有文件设置编码一次?

解决方案

我刚刚解决了这个问题(eclipse 3.5.2)



需要两个步骤:


  1. 更改文件夹属性页面上的文本文件编码(.setting /org>
  2. 在首选项页面上更改* .html文件内容类型的默认编码常规/内容类型


I have some UTF-8 HTML templates in my Eclipse project and Eclipse keeps treating them as if they had a different encoding. It says the encoding is "determined from content". I want to force the correct encoding.

I can force it for a single file but setting an encoding for the parent folder won't affect the files in it because instead of the "inherit" option in the property sheet there's the "determined from content" thing in it's place.

Is it possible to set the encoding for all files in a Project at once?

解决方案

I've just solved this problem (eclipse 3.5.2)

Two steps required:

  1. Change text file encoding on the folder property page(.setting/org.eclipse.core.resources.prefs file has been created in my project)
  2. Change default encoding on *.html file content type on the Preference page General/Content Types

这篇关于在Eclipse中同时更改多个文件的文本编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆