I was able to overcome the problem with setting the JAVA_OPTS
environment variable in Windows to
JAVA_OPTS=-Dfile.encoding=UTF-8
At least on the command line it works for me now.
Setting it as an option for the Eclipse launcher also solves the problem
inside Eclipse!
Do you know on what environment variables Groovy is basing its
decision? Or is it just using some underlying Java functionality?
Russel Winder schrieb:
On Fri, 2007-03-23 at 14:52 -0500, Michael Baehr wrote:
I just wrote the same Groovy script in Eclipse (everything set to
UTF-8 there) under Windows.
I start it and get 6 as the result.
I write an equivalent Java class and get the expected 3.
If I access the Java String from the Groovy script, I get the
expected 3.
So somewhere there is a difference between Java and Groovy here!
Curses.
I get the problem on Ubuntu and Mac OS X if I don't have the environment
variables set correctly but otherwise it works fine. I don't have
Windows so I can't be of much help. Sorry.
PS I just tried on Solaris and it looks like the groovy shell script is
broken on Solaris :-(