Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Native Launcher
-
Labels:None
-
Environment:windows XP sp3, java 1.6.0_14, groovy 1.6.3
1.6.1 version of groovy eclipse plugin
-
Number of attachments :
Description
I tried to get some file name from command line parameter, which have some Chinese characters. For example:
public class CNtest{
public static void main(def args){
println args
}
}
then run with
groovy CNtest 白色城堡
will get following result
[°×?]
There is no difference if I put quote around the Chinese file name.
However, I believe previous version of groovy don't have this problem – maybe version before 1.6.2. Because I don't remember I met this problem before I upgrade groovy. I tried to install an older version groovy but it seemed that I have to uninstall current version first, so I didn't continue.
However, this script can get the parameter properly in Eclipse groovy plugin. I put the same Chinese file name into "run configuration" "program parameters", then I can get the proper result. I'm not sure if this is related to groovy 1.6.1 bundled with the plugin, or something related to eclipse handling parameters.
there are many possible reasons for this not working. I just tested 1.6.3 on my ubuntu box here and it did not have any problem from the command line. Could you try out the command line as well please?