views:

31

answers:

1

I'm using Eclipse for programming. In one method of my project i used the String "§". I use a svn repository. If i edit the file with Ubuntu OS the § symbol isnt displayed correctly in the eclipse editor and also in my programm, if I edited it before on Windows. The same is vice versa.

Any hints how to solve this problem? I don't want to always change the symbol manually if I comitted a new version from another OS

+2  A: 

Check the "Text file encoding" of your sources.
(Preferences / General / Workspace)

I would recommend in your case UTF-8.

You can also set the default type in Preferences / General / Content Type / Text / Java source file

alt text

VonC
Also, once the file encoding is changed you might have to retype the symbols that were broken.
DrDro
thanks this solved the problem. But this is really annoying that this isn't the default setting. Now I have to inform all other contributers to the source code to change their settings...
Roflcoptr
You can also change these setting only on given project (you have to right click on project and choose Properties).
Lukasz Stelmach