

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
25 messages in org.codehaus.groovy.userRe: [groovy-user] File encoding problem| From | Sent On | Attachments |
|---|---|---|
| Michael Baehr | Mar 23, 2007 7:25 am | |
| Guillaume Laforge | Mar 23, 2007 9:31 am | |
| Michael Baehr | Mar 23, 2007 9:57 am | |
| Guillaume Laforge | Mar 23, 2007 10:07 am | |
| Michael Baehr | Mar 23, 2007 10:16 am | |
| Guillaume Laforge | Mar 23, 2007 10:20 am | |
| Michael Baehr | Mar 23, 2007 10:24 am | |
| Guillaume Laforge | Mar 23, 2007 12:19 pm | |
| Michael Baehr | Mar 23, 2007 12:36 pm | .groovy |
| Russel Winder | Mar 23, 2007 12:41 pm | |
| Guillaume Laforge | Mar 23, 2007 12:47 pm | |
| Michael Baehr | Mar 23, 2007 12:52 pm | |
| Russel Winder | Mar 23, 2007 12:53 pm | |
| Michael Baehr | Mar 23, 2007 12:54 pm | |
| Russel Winder | Mar 23, 2007 12:58 pm | |
| Michael Baehr | Mar 23, 2007 1:01 pm | |
| Russel Winder | Mar 23, 2007 1:04 pm | |
| Michael Baehr | Mar 23, 2007 1:05 pm | |
| Russel Winder | Mar 23, 2007 1:06 pm | |
| Michael Baehr | Mar 23, 2007 1:24 pm | |
| Russel Winder | Mar 23, 2007 1:31 pm | |
| Michael Baehr | Mar 23, 2007 1:40 pm | |
| Gavin Grover | Mar 23, 2007 4:51 pm | |
| Barzilai Spinak | Mar 23, 2007 6:39 pm | |
| Jochen Theodorou | Mar 25, 2007 9:59 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [groovy-user] File encoding problem | Actions... |
|---|---|---|
| From: | Michael Baehr (code...@googlemail.com) | |
| Date: | Mar 23, 2007 12:54:48 pm | |
| List: | org.codehaus.groovy.user | |
I use JEdit, which doesn't seem to write a BOM header.
This is my dump of the file (identical in Windows and Linux):
0000000 d e f s = " 303 244 303 266 303 274 " 0000020 \r \n p r i n t l n s . s i z e 0000040 ( ) \r \n 0000044
Also see the post about my tests in Eclipse!
Guillaume Laforge schrieb:
I reproduced the problem here as well with a source file with French accents saved as UTF-8. Notepad saves UTF-8 files with a BOM header, perhaps that's what causing the problem, I'm not sure. But I can for sure say it used to work in the past, as I've done that before. But at the moment, I'm clueless on what's happening.
On 3/23/07, Michael Baehr <code...@googlemail.com> wrote:
Yes, I am! I actually wrote it under Windows (and all my Editors + Eclipse are set to UTF-8), and for testing transferred it to my Linux box.
See the attached file and try it for yourself!
groovy utf8
gives me 6 in Windows and 3 in Linux ...
Guillaume Laforge schrieb:
And you're 100% sure of the encoding you used to save this file?
On 3/23/07, Michael Baehr <code...@googlemail.com> wrote:
Tried all that (UTF-8 UTF8 utf-8 utf8) :-(
Guillaume Laforge schrieb:
What about uppercase? or without the hyphen?
On 3/23/07, Michael Baehr <code...@googlemail.com> wrote:
Here is what I get when I try to use -c or --encoding
$ groovy -c utf-8 test.groovy Caught: BUG! exception in phase 'parsing' in source unit 'test.groovy' charsetName
So I'm not sure how to use those switches properly - or should BUG! tell us something here ...
Michael
Guillaume Laforge schrieb:
The reader reading the sources is supposed to be using the specified charset, otherwise it tries to guess the encoding.
On 3/23/07, Michael Baehr <code...@googlemail.com> wrote:
I'm not sure about Windows XP - isn't it Unicode anyways? It is set to German though. My Linux is en_US.UTF-8.
But I'm not even talking about printing the String to the
console
(this
is a problem with my Linux installation as well, as it seems to have some problems with Unicode), but the interpretation of the
Groovy
file
by the Groovy interpreter/compiler.
How are the -c / --encoding switches supposed to be used?
Michael
Guillaume Laforge schrieb:
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:
---------------------------------------------------------------------
To unsubscribe from this list please visit:
---------------------------------------------------------------------
To unsubscribe from this list please visit:
--------------------------------------------------------------------- To unsubscribe from this list please visit:
def s = "äöü" println s.size()
--------------------------------------------------------------------- To unsubscribe from this list please visit:








.groovy