We have an Eclipse project with several developers. The default character encoding differs between machines. How can I configure Eclipse to use a specific character encoding, so that the setting persists between machines with no manual intervention needed?
Asked
Active
Viewed 201 times
0
-
We're using Gradle, and there is a plugin for generating classpaths and whatnot, but there's no hook in the plugin for setting the character encoding. – Emil Lundberg Sep 24 '15 at 12:33
-
http://stackoverflow.com/q/16294353/1700321. – Aleksandr M Sep 24 '15 at 12:38
-
This is not about setting the character encoding for reading in Gradle, it's *specifically* about setting the encoding *in Eclipse* so that *Eclipse* doesn't *write* text files in an unwanted encoding. – Emil Lundberg Sep 24 '15 at 12:39
-
I followed a link to the documentation for Gradle's `CompileOptions`, which seems to have been deleted now. The StackOverflow link wasn't on my screen when I wrote my last comment. That is indeed a legitimate duplicate candidate, although my question is build system agnostic while the linked question is not. – Emil Lundberg Sep 24 '15 at 13:04
-
It is build system vs ide. Different people can use different ide-s for the same project, but different build systems is rarely used for the same project. – Aleksandr M Sep 24 '15 at 17:36
1 Answers
1
When you configure this in the GUI, Eclipse stores this setting at .settings/org.eclipse.core.resources.prefs
. You can simply commit that file to version control:
eclipse.preferences.version=1
encoding/<project>=UTF-8

Community
- 1
- 1

Emil Lundberg
- 7,268
- 6
- 37
- 53