Reputation: 3410
I use Eclipse 3.5 on Windows, with PDT and Subclipse plugins, with both legacy projects using ISO-8859-1 encoding (latin-1), and newers ones wich use UTF-8. I configured my workspace to use UTF-8, and I configured old projects to use latin-1. But every time I open an old project, it use UTF-8. With a workspace using latin-1 by default, I have the same problem with utf-8 projects edited as iso-8859-1.
My encoding choice is written in the file .settings/org.eclipse.core.resources.prefs but seems to be never read.
The only solution for now is to have a latin1 workspace, and an utf8 one. Any better idea?
Upvotes: 3
Views: 1330
Reputation: 28301
In the project's properties (right-click on project => Properties => Resource) there is a Text File Encoding section.
Did you configure the encoding here? If not, you have two choices : "Inherited from container" (which should be the workspace default, in your case UTF-8) and "Other" which let you choose a specific encoding (ISO-88591)...
I just tested that on one of my projects, closed it and reopened it and the ISO88591 encoding is still configured.
Note that I'm using a plain Eclipse though, not a PDT project. PDT may handle encoding settings differently, but somehow I doubt that (file encoding being a low level functionality it makes sense that all plugins share this behavior).
Upvotes: 4