Eclipse 编码 MacRoman -> UTF8
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2707986/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse Encoding MacRoman -> UTF8
提问by wishi
I recently created a project, organized it and well... I used my Mac with Eclipse running. Somehow it stored everything in MacRoman. The project has to be UTF8. Is there any easy way to handle the conversions?
我最近创建了一个项目,组织起来很好……我在运行 Eclipse 的情况下使用了我的 Mac。不知何故,它将所有内容存储在 MacRoman 中。该项目必须是UTF8。有没有简单的方法来处理转换?
回答by VonC
You have some detailed explanation in this blog postby David HOLTfor the WOLips/WOProject.
你有一些这方面的详细说明博客文章由大卫·霍尔特的WOLips / WOProject。
Check your default preferences:
检查您的默认首选项:
In Eclipse, go to
Preferences>General>Workspace
and selectUTF-8
as theText File Encoding
.
This should set the encoding for all the resources in your workspace. Any components you create from now on using the default encoding should all match.Change the encoding for a resource (project, folder or file)
Right (or Control) click on the resource in the WO Package Explorer and select the Properties option at the bottom of the contextual menu.
Go toResource>Text File Encoding
.
You should see "Inherited from container (UTF-8)
" if you've made the change above, otherwise it will be (MacRoman).
SelectOther - UTF-8
and Apply to make the warning go away.
在 Eclipse 中,转到
Preferences>General>Workspace
并选择UTF-8
作为Text File Encoding
.
这应该为工作区中的所有资源设置编码。从现在开始使用默认编码创建的任何组件都应该匹配。更改资源(项目、文件夹或文件)的编码
右键(或 Control)单击 WO Package Explorer 中的资源,然后选择上下文菜单底部的 Properties 选项。
去Resource>Text File Encoding
。如果您进行了上述更改,
您应该会看到“Inherited from container (UTF-8)
”,否则将是 (MacRoman)。
选择Other - UTF-8
并应用以使警告消失。