Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1-rc-1
-
Fix Version/s: 1.5.5
-
Component/s: class generator, parser, XML Processing
-
Labels:None
-
Environment:Vista, maven project built with <encoding>utf-8</encoding>
-
Number of attachments :
Description
The following code
CompilerConfiguration config = new CompilerConfiguration();
config.setSourceEncoding("UTF-8");
gcl = new GroovyClassLoader(Thread.currentThread().getContextClassLoader(), config);
gcl.parseClass(afile);
causes the following error:
1: Invalid variable name. Must start with a letter but was: ?survivantManager.
Node: org.codehaus.groovy.ast.expr.VariableExpression. At [1:1] @ line 1, column 1.
?survivantManager...
The file has been saved as utf-8 and tested with various programs to confirm that it is presented correctly, and that there is no hidden character (the one appearing as a ?) in the beginning of the file.
Any suggestions? Or is it indeed a bug?
Thanks for the help in advance!
With what editor / IDE have you edited your file?
Does your file have a BOM (Byte Order Mark) at the beginning of the file? (check with an hex viewer of some sort)