Community
Participate
Working Groups
Build Identifier: 20090621-0832 Since it is currently not offered, I tried to change it via "Window - Preferences - General - Content-Types - Text" but in the first few attempts I failed Reproducible: Always
Created attachment 171236 [details] ConflictInEncoding.png only once I expanded each sub-triangle of "Text" and wherever I found ISO-8859-1 placed UTF-8, it now appears to work. For the 2 red circles I placed, I suggest to have a button that jumps deep down to the exact content-type where a different default (than the current ISO-8859-1) can be updated
The defaults for certain content types like ISO-8859-1 for Java properties files or UTF-8 for XML files shouldn't be changed in general. If you desire a different encoding then you can either do that directly on the file or most likely on the project. This also has the advantage that you can share your code with other people (e.g. via repository) since the encoding data will be part of the project, which is not the case if you change the workspace defaults.
Thanks for the info. In this case, please 1) say which specific content type is the conflicting one (I still don't know which of the myriads of content types I changed finally had the desired effect - my first guesses were wrong and had no effect) 2) add a button to the place where I can change the very content type in the project So as a conclusion, where I placed the red circles, my RFE is therefore per red circle, add two buttons a) one that lets you change the encoding default of the specific project b) one that lets you change the encoding default platform-wide (I am fine if that is labeled deprecated and has an explanation link to https://bugs.eclipse.org/bugs/show_bug.cgi?id=315934#c2)
>1) say which specific content type is the conflicting one Of course with the one of your file. The file's encoding is on the same properties page, see 'Type:'. So, you'd only have to change that one but as said before this is not smart and hence we won't support to do this easily. You should simply say 'Yes' in the dialog. As for adding a button to change the project or workspace encoding: that wouldn't help because it would still take it from the file's content type (I was wrong about that in my previous comment). The only safe thing you can really do is to change it directly on the file which then allows to share this safely with others.
Thanks for the clarification, so my Type was "JSP Fragment". I still ask you to consider my RFE "a)" in combination with below c) Changing it directly on the file is not really feasible since i) I have hundreds of files that need to be changed and when I select more than one in the Navigator, the mouse-right-click context menu no longer offers to change the "Properties" Too bad that the Content-Type Encoding apparently can only be specified on a global level and not per Project ==> RFE c) pls allow to set the Content-Type Encoding on a per project level
>==> RFE c) pls allow to set the Content-Type Encoding on a per project level This makes more sense ;-)
Guess this one goes to Paul's plate.
I still have problems about this issue. Now JSP files default encoding cannot be set at project level. I use UTF-8 encoding but when somebody creates a workspace and imports the project it remains wrong until changes workspace default encoding from ISO-8859-1 to UTF-8. It would be fine if this encoding could come from project settings.
(In reply to Missing name from comment #8) > I still have problems about this issue. Now JSP files default encoding > cannot be set at project level. I use UTF-8 encoding but when somebody > creates a workspace and imports the project it remains wrong until changes > workspace default encoding from ISO-8859-1 to UTF-8. It would be fine if > this encoding could come from project settings. Please read comment 2.
@Dani, yes, you are right. I wrote the same. I would like to be able to set JSP encoding at project level but I can't. I can do it by setting at files one-by-one but it is not a good solution as this rule won't work on newly created JSP files and needs to change existing files. This setting in org.eclipse.core.resources.prefs doesn't work for JSP files: encoding/<project>=UTF-8 It would be fine if I could set similar: jsp-encoding/<project>=UTF-7