英文:
Change sources encoding to inherited in Eclipse
问题
我在编码和Eclipse方面遇到了很多问题。
我将我的Eclipse默认配置为“UTF-8”,但有时我有一些项目是使用CP1252编码的。因此,为了处理这个问题,我将这些项目配置为“CP1252”:
(图片)
我注意到所有子文件夹的编码都是这个,因为它们是配置为“从容器继承(CP1252)”,但是我不知道为什么我的Java源文件没有这个选项:
(图片)
而且我无法从内容类型中移除*.java文件,因为所有的“移除”按钮都是灰色的:
(图片)
任何帮助将不胜感激。
谢谢!
英文:
I have lots of problems with encoding and Eclipse.
I configured my Eclipse to "UTF-8" by default but sometimes, I have some projects whiches are in CP1252. So for dealing with that, I configue theses projects with "CP1252" :
I see all children folders are with this encoding because they are configured with "Inherited from container (CP1252)" but I don't know why my java sources hasn't this option :
And I cannot remove *.java files from contents types because all "Remove" buttons are greyed :
Any help will be appreciate.
Thanks !
答案1
得分: 1
删除 'Default encoding' 字符串使其为空,应继承容器中的设置。
在更改字符串后,您需要按下 'Update' 按钮以更新默认设置,然后使用 'Apply and Close' 关闭首选项页面。
注意:像 "Java Source File" 这样的内容类型无法被移除,因为它们是由 Eclipse 插件贡献的。只有您手动添加的内容类型可以被移除。
英文:
Deleting the 'Default encoding' string so that it is empty should get the setting inherited from the container.
You need to press the 'Update' button after changing the string to update the default setting and then close the preference page with 'Apply and Close'.
Note: Content types like "Java Source File" cannot be removed because they are contributed by Eclipse plug-ins. Only content types you add manually can be removed.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论