Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9712

groovyc fails when compiling class starting with unicode character

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.5
    • 4.0.0-alpha-1, 3.0.6
    • Compiler
    • None
    • Windows 10 version 1809
      Groovy 3.0.5

    Description

       

      Compiling the code below with groovyc results in the following error message:

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      Ö_ClassWithUlmaut.groovy: 2: Unexpected input: '(' @ line 2, column 41.
      Ö_ClassWithUlmaut getInstance(){
      ^

      1 error

       

      The file is encoded in Windows-1252 and I'm compiling it with the following command:
      \Tools\groovy-3.0.5\bin\groovyc --encoding Windows-1252 Ö_ClassWithUlmaut.groovy

      Compiling with version 2.5.8 works fine

       

      The problem only seem to occur when the class name starts with a unicode character i.e. the problem doesn't occur if the class name has an unicode in it as long as it isn't the first character

      Example:

      class Ö_ClassWithUlmaut {
          static Ö_ClassWithUlmaut getInstance(){
          }
      }
      

       

      Attachments

        Activity

          People

            emilles Eric Milles
            TedL Ted Lundqvist
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h