|Re: Text encoding not picked up from container [message #481864 is a reply to message #481744]
||Mon, 24 August 2009 11:22
| Matthew Dickie
Registered: July 2009
Daniel Megert wrote:
> Setting the language does not set the encoding. It uses the default
> encoding of your OS. This seems to be set to cp1252.
The encoding in the OS is 'cp866'. Executing the windows command 'chcp'
results in the output 'Active code page: 866'.
Having done some further investigation in this bug I discovered
https://bugs.eclipse.org/bugs/show_bug.cgi?id=51928. Comment #7 of that
explains that Eclipse picks up the text encoding from the JVM. It can be
changed by setting the system property file.encoding.
I wrote a simple Java test program to print out the value of this
property and it gives 'cp1252' even when 'chcp' gives cp866 as the code
page. This is with with standard Sun JVM for windows.
You can either
> change it for Eclipse on the General > Workspace page or more portable
> on the project's property page. The benefit of setting the encoding on
> the project is that it will store that value in the repository and when
> someone else checks out that project later it will get the correct
> encoding no matter what encoding the workspace has.
I know how to do this. End users of our Eclipse based IDE may expect the
default file encoding to be correct for their locale and language from
the start. We have decided to hack the Eclipse execution wrapper so that
it picks up the text encoding from the OS and sets the default correctly.
Thanks for your help
Powered by FUDForum
. Page generated in 0.04824 seconds