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

Groovyc: taking file.encoding property over from parent process when forked

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.2, 1.8-beta-1
    • Ant integration
    • None
    • MacOS10.6, Groovy1.7.0, (Gradle0.9-SNAPSHOT)
    • Patch

    Description

      I want to add file.encoding property as one of the command line parameters of org.codehaus.groovy.ant.Groovyc in order to take it over to sub process from parent process.
      I've attached a simple patch.

      Background:
      I'm using Gradle for building some Groovy projects. (Gradle is my favorite.) But when there are compilation errors in target sources, garbled characters are written as console log. I can't read the error messages. It's very difficult to debug the code.

      My development environment is as follows:

      • (a) I'm Japanese who uses multi-bytes characters
      • (b) using Gradle 0.9-SNAPSHOT (my local build from source code)
      • (c) using Groovy 1.7.0
      • (d) using MacOS 10.6 whose default encoding is Shift_JIS
        (it's UTF-8 in MacOS 10.5 previous. I think that the change by Apple is causing so much trouble )
      • (e) my terminal's character encoding is UTF-8
      • (f) I execute java command with -Dfile.encoding=UTF-8

      I think that the environment is not so minority among developers who is Mac users in multi-bytes world.
      To use file.encoding property like (f) is not official way to specify default encoding. But it's working well now and any side effect will not occur.

      regards

      Attachments

        1. groovyc-fileencoding.patch
          0.7 kB
          Yasuharu Nakano

        Activity

          People

            paulk Paul King
            nobeans Yasuharu Nakano
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: