eclipse.platform icon indicating copy to clipboard operation
eclipse.platform copied to clipboard

Reset preference should set the encoding to UTF-8

Open vogella opened this issue 1 year ago • 5 comments

If a project does not have an explicit encoding set, we can a warning. But I reset the preference to default, I get encoding from the container. This feels wrong, I suggest we change our default to use UTC-8 encoding.

Current behavior:

Before reset:

image

After reset:

image

vogella avatar Jul 02 '24 10:07 vogella

I think the basic issue was this one https://github.com/eclipse-platform/eclipse.platform.resources/issues/154

vogella avatar Jul 02 '24 10:07 vogella

Also this one set the UTF-8 default for new workspaces. https://github.com/eclipse-platform/eclipse.platform.resources/pull/51/files but restore defaults still changes it to inherit from container.

vogella avatar Jul 02 '24 10:07 vogella

+1 reset workspace should always be the same state as in new workspace

jukzi avatar Jul 02 '24 13:07 jukzi

Not sure there the default is set, /org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PreferenceInitializer.java seems to not involved it the preference page setting. I think we should also set in this page UTF-8 as default but that has no direct impact on the preference page default.

vogella avatar Jul 03 '24 06:07 vogella

https://github.com/eclipse-platform/eclipse.platform/pull/1462

vogella avatar Jul 03 '24 06:07 vogella