Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0
-
Fix Version/s: 1.1-beta-2
-
Component/s: None
-
Labels:None
-
Environment:Hide$ uname -a
CYGWIN_NT-6.0 hrk-PC 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)Show$ uname -a CYGWIN_NT-6.0 hrk-PC 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin java version "1.5.0_11" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
-
Number of attachments :
Description
I wrote a groovy script like,
----HelloUtf8.groovy (saved with UTF8)
println "こんにちは";
then, executed this and it resulted like,
$ groovy -c UTF8 HelloUtf8.groovy
Caught: BUG! exception in phase 'parsing' in source unit 'HelloUtf8.groovy' char
setName
so, I checked "GROOVY_1_0/src/main/groovy/ui/GroovyMain.java"
where getting encoding from command line.
@@ -241,7 +244,9 @@
// add the ability to parse scripts with a specified encoding
if (line.hasOption('c')) {
- main.conf.setSourceEncoding(line.getOptionValue("encoding"));
+ main.conf.setSourceEncoding(line.getOptionValue('c'));
+ System.out.println("GroovyMain:encoding:" +
+ main.conf.getSourceEncoding());
}
It's found that 'main.conf.setSourceEncoding(line.getOptionValue("encoding"))' returned null,
and 'main.conf.setSourceEncoding(line.getOptionValue('c'))' returned "UTF-8".
sorry. following statements are not collect.
It's found that 'main.conf.setSourceEncoding(line.getOptionValue("encoding"))' returned null,
and 'main.conf.setSourceEncoding(line.getOptionValue('c'))' returned "UTF-8".
they have to be fixed ,
It was found that 'line.getOptionValue("encoding")' returned null,
and 'line.getOptionValue('c')' returned "UTF-8".