Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse Charset for working with Windows & Linux on same Project

If you take a Project, where other Developers before work with the defaultsetting on Windows Eclipse installations (cp1250)... what can you do to come clear with your linux-installation of eclipse?

Or even, if you still work on Linux, and the other Developers work on windows, and don't wan't to change there settings?

like image 508
suther Avatar asked Aug 16 '12 15:08

suther


People also ask

How to set UTF 8 encoding in Eclipse?

In Eclipse, go to Preferences>General>Workspace and select UTF-8 as the Text File Encoding. This should set the encoding for all the resources in your workspace.

How do you change a charset in Java?

Strings are immutable in Java, which means we cannot change a String character encoding. To achieve what we want, we need to copy the bytes of the String and then create a new one with the desired encoding.

How do I start Eclipse?

You can start Eclipse by running eclipse.exe on Windows or eclipse on other platforms. This small launcher essentially finds and loads the JVM. On Windows, the eclipsec.exe console executable can be used for improved command line behavior.


1 Answers

I recommend to set eclipse Charsetting by default on UTF-8 instead of cp1250.

Here the Solution:

  1. Create a separately Workspace for all your cp1250-encoded Projects
  2. Go to Window > Pereferences > General > Workspace Type cp1250 into the dropdownbox (if not in the list, your have to type it!!)
  3. Maybe, if it's a Problem, choose "line delemiter" Windows (For me the default-setting always work, so i doesn't need to change it anyway!)

Here a Screenshot off it: Config looks like this

Save it, and your done.

like image 164
suther Avatar answered Oct 14 '22 20:10

suther