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:Guillaume Laforge (glaf@gmail.com)
Date:Mar 23, 2007 9:31:16 am
List:org.codehaus.groovy.user

What are the default system charsets of your OSes?

On 3/23/07, Michael Baehr <code@googlemail.com> wrote:

Hi there,

I created a Groovy script with the following content:

def s = "äöü" // three German umlaut characters println s.size()

The script is saved as UTF-8.

If I run it on Linux, it correctly prints "3", but on Windows it prints "6", interpreting each double-byte UTF-8 character as two distinct characters.

I tried to play with the -c / --encoding command line parameters, but got error messages like the following:

$ groovy -c utf-8 test.groovy Caught: BUG! exception in phase 'parsing' in source unit 'test.groovy' charsetName

Any clues what's going on?

cu

Michael

--------------------------------------------------------------------- To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email