I've been tracking down encoding problems in our Eclipse installation for the last two hours and I finally figured our that the Properties Editor Plugin seems to be the culprit. First of all, let me explain what behaviour we've been experiencing:
Since Java Properties Files have to be ISO-8859-1 encoded, we've been looking for a way to tell Eclipse to treat every Properties file the same way. As you certainly know, Eclipse provides a Content-Type feature which allows to centrally set the Encoding for certain file types. The *.properties file entry is set to ISO-8859-1 by default (as one would expect). However, all property files in our project were showing the following text file encoding: "Default (inherited from container: UTF-8)".
At some point we figured out that the same project in the exact same workspace shows a different value if we use a completely blank Eclipse JEE (i.e. no additional plugins or other changes). Using our blank eclipse the value for the properties text file encoding is: "Default (determined from content-type: ISO-8859-1)". Obviously, we consider this the expected behavior.
When we uninstalled the Properties Editor Plugin in our "normal" Eclipse both applications displayed the same behavior when we opened the properties dialog for a *.properties file. In both Eclipses the values for text file encoding was "Default (determined from content-type: ISO-8859-1)".
Note: this didn't only happen for *.properties files but also for other file types. It seems like the Properties Editor plugin somehow sabotages the algorithm used by Eclipse to determine the proper encoding for a file. It seems like content-types are ignored when the Properties Editor is used.
I've been tracking down encoding problems in our Eclipse installation for the last two hours and I finally figured our that the Properties Editor Plugin seems to be the culprit. First of all, let me explain what behaviour we've been experiencing:
Since Java Properties Files have to be ISO-8859-1 encoded, we've been looking for a way to tell Eclipse to treat every Properties file the same way. As you certainly know, Eclipse provides a Content-Type feature which allows to centrally set the Encoding for certain file types. The *.properties file entry is set to ISO-8859-1 by default (as one would expect). However, all property files in our project were showing the following text file encoding: "Default (inherited from container: UTF-8)".
At some point we figured out that the same project in the exact same workspace shows a different value if we use a completely blank Eclipse JEE (i.e. no additional plugins or other changes). Using our blank eclipse the value for the properties text file encoding is: "Default (determined from content-type: ISO-8859-1)". Obviously, we consider this the expected behavior.
When we uninstalled the Properties Editor Plugin in our "normal" Eclipse both applications displayed the same behavior when we opened the properties dialog for a *.properties file. In both Eclipses the values for text file encoding was "Default (determined from content-type: ISO-8859-1)".
Note: this didn't only happen for *.properties files but also for other file types. It seems like the Properties Editor plugin somehow sabotages the algorithm used by Eclipse to determine the proper encoding for a file. It seems like content-types are ignored when the Properties Editor is used.