eclipse encoding settings
Encoding is a pretty troubling topic if not care is taken! So you better make sure which settings your favourite IDE is using. Typically UTF-8 is the most flexible ! Here is a short summary how to set it up for eclipse.
- For a global encoding setting add
-Dfile.encoding=UTF-8toeclipse.ini. - For setting the encoding on a per workspace basis, use Preferences->General->Workspace!
- To set the encoding on a per project basis us the tip as documented here. Or shortly open project properties and change to UTF-8
The last one I guess should be the preferred as it does not rely on individual developers to setup their IDE properly, the settings are stored locally with the project.

6 Comments
OULD - 2009/03/10
Good article
Thanks.
Steve Cohen - 2009/06/02
Losing my mind!
I have the following strange situation:
I am using Ganymede on two separate machines, one running Windows XP and the other running Ubuntu Linux. What makes this REALLY weird is that I move workspaces BETWEEN the two machines so that I can access Subversion from the Windows box (a corporate laptop) which I can’t do from the Linux box, (a private PC). In spite of the different path names of the workspace on the two boxes, this works, more or less, enabling me to develop quickly on the Linux box and use the Windows box for dealing with version control.
Until now. Prior to Ganymede I had no encoding issues, but now I am up to my neck in them. In java code, I have several places where I do String.equals() comparison against Spanish literal strings which have non-ascii characters.
What are the correct encoding settings needed to make the garbage disappear?
Steve Cohen - 2009/06/02
@Steve Cohen
moving workspace between two machines accomplished via flash drive
alex - 2009/07/28
saved my day
Bola - 2010/11/22
u have solved my problem . thanks
krzysztof - 2011/04/09
thank you, you’ve solved my problem!! works perfect now
3 Trackbacks