Eclipse Encoding MacRoman -> UTF8

2019-01-11 12:38发布

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?

1条回答
Animai°情兽
2楼-- · 2019-01-11 13:38

You have some detailed explanation in this blog post by David HOLT for the WOLips/WOProject.

Check your default preferences:

Encoding in Eclipse preferences

In Eclipse, go to Preferences>General>Workspace and select UTF-8 as the Text 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 to Resource>Text File Encoding.
You should see "Inherited from container (UTF-8)" if you've made the change above, otherwise it will be (MacRoman).
Select Other - UTF-8 and Apply to make the warning go away.

查看更多
登录 后发表回答