25 messages in org.codehaus.groovy.userRe: [groovy-user] File encoding problem
FromSent OnAttachments
Michael BaehrMar 23, 2007 7:25 am 
Guillaume LaforgeMar 23, 2007 9:31 am 
Michael BaehrMar 23, 2007 9:57 am 
Guillaume LaforgeMar 23, 2007 10:07 am 
Michael BaehrMar 23, 2007 10:16 am 
Guillaume LaforgeMar 23, 2007 10:20 am 
Michael BaehrMar 23, 2007 10:24 am 
Guillaume LaforgeMar 23, 2007 12:19 pm 
Michael BaehrMar 23, 2007 12:36 pm.groovy
Russel WinderMar 23, 2007 12:41 pm 
Guillaume LaforgeMar 23, 2007 12:47 pm 
Michael BaehrMar 23, 2007 12:52 pm 
Russel WinderMar 23, 2007 12:53 pm 
Michael BaehrMar 23, 2007 12:54 pm 
Russel WinderMar 23, 2007 12:58 pm 
Michael BaehrMar 23, 2007 1:01 pm 
Russel WinderMar 23, 2007 1:04 pm 
Michael BaehrMar 23, 2007 1:05 pm 
Russel WinderMar 23, 2007 1:06 pm 
Michael BaehrMar 23, 2007 1:24 pm 
Russel WinderMar 23, 2007 1:31 pm 
Michael BaehrMar 23, 2007 1:40 pm 
Gavin GroverMar 23, 2007 4:51 pm 
Barzilai SpinakMar 23, 2007 6:39 pm 
Jochen TheodorouMar 25, 2007 9:59 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [groovy-user] File encoding problemActions...
From:Russel Winder (rus@russel.org.uk)
Date:Mar 23, 2007 1:31:38 pm
List:org.codehaus.groovy.user

On Fri, 2007-03-23 at 15:24 -0500, Michael Baehr wrote:

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!

I can confirm that (now I have "downgraded" the groovy shell script so it actually works of Solaris 10) your test program works fine on Solaris and Ubuntu and fails on Mac OS X. I have exactly the same environment variables set for Ubuntu and Mac OS X but slightly different for Solaris as Sun refuse to accept the Brits will ever use UTF-8.

On Mac OS X I have JDK 1.5 and on Ubuntu I have JDK 1.6 so it could be a JDK issue. Does anyone know when Apple will release their JDK 1.6?

You fix works fine on Mac OS X so it is not a Windows specific thing. Neither is it a Groovy thing per se since I am using exactly the same Groovy installation on Solaris, Mac OS X and Ubuntu -- same files in fact.

It looks like we need to add the JAVA_OPTS stuff to the other shell scripts as well as groovy.