• Icon: Patch Patch
    • Resolution: Fixed
    • Icon: Major Major
    • tasks-plugin
    • None
    • Platform: All, OS: All

      1. checkstyle_plugin.patch
        6 kB
      2. utf-8.patch
        2 kB
      3. utf-8.patch
        11 kB

        [JENKINS-1999] utf-8 charset support

        jiai added a comment -

        Is there any progress on this issue?

        jiai added a comment - Is there any progress on this issue?

        Ulli Hafner added a comment -

        Seems that the guy working on this topic got stuck somewhere in between. I'll
        ask if he still has the time to finish it...

        Ulli Hafner added a comment - Seems that the guy working on this topic got stuck somewhere in between. I'll ask if he still has the time to finish it...

        unr303 added a comment -

        We use tasks plugin for like a year and it isnt very usefull except for seeing
        trends because all you see in details is

        LandPropertyFormVM.java
        сколько можно копипастить???
        LandPropertyFormVM.java
        и зачем мы это делаем?

        Only with this issue resolved plugin will become usefull for us. System codepage
        is cp1251, sources are in utf-8 and cp1251 (legacy).

        I ask you to take a note of this please. Parts of source tree checked out from
        repository (perhaps from several repositories and from externals) are may be in
        different encoding. One project may have utf-8, another cp1251, yet another
        cp1252. They all sure will compile because of correct -encoding to javac.

        I have no illusions about possibility to detect project encoding from build.xml
        or something but i see another options that may help with this problem (as
        opposed to global option that specifies encoding for all files).
        1) autodetect encoding of source file by its context (Far Manager for example
        does this)
        2) add to task scanner`s properties of project map like

        {ant path pattern}

        ->

        {encoding}

        unr303 added a comment - We use tasks plugin for like a year and it isnt very usefull except for seeing trends because all you see in details is LandPropertyFormVM.java сколько можно копипастить??? LandPropertyFormVM.java и зачем мы это делаем? Only with this issue resolved plugin will become usefull for us. System codepage is cp1251, sources are in utf-8 and cp1251 (legacy). I ask you to take a note of this please. Parts of source tree checked out from repository (perhaps from several repositories and from externals) are may be in different encoding. One project may have utf-8, another cp1251, yet another cp1252. They all sure will compile because of correct -encoding to javac. I have no illusions about possibility to detect project encoding from build.xml or something but i see another options that may help with this problem (as opposed to global option that specifies encoding for all files). 1) autodetect encoding of source file by its context (Far Manager for example does this) 2) add to task scanner`s properties of project map like {ant path pattern} -> {encoding}

        unr303 added a comment -

        adding cc

        unr303 added a comment - adding cc

        Ulli Hafner added a comment -

        Thanks for the tips! Seems to be quite complicated to get a solution that works
        for everybody.

        Don't you have a source encoding property in ant for each target that I can
        read? (In maven there is such a property defined for each project.) Or are your
        files mixed in one of your ant projects?

        I'll have a look at

        Ulli Hafner added a comment - Thanks for the tips! Seems to be quite complicated to get a solution that works for everybody. Don't you have a source encoding property in ant for each target that I can read? (In maven there is such a property defined for each project.) Or are your files mixed in one of your ant projects? I'll have a look at

        unr303 added a comment -

        We use netbeans that uses ant to build projects: build.xml includes
        build-impl.xml that reads projects.properties and there are
        source.encoding=UTF-8 or source.encoding=windows-1251.
        Software consists of multiple projects (modules, libraries, core, etc).
        Structure of workspace after all checkouts is done is like so:

        core/corelib1 (project with utf-8 sources)
        core/corelib2 (project with utf-8 sources)
        core/kernel (legacy project with cp1251 sources)
        product/module1 (legacy project with cp1251 sources)
        product/module2 (project with utf-8 sources)
        product/build.xml (this simply refers to build.xml in all other projects to
        build everything)

        Each project have all files in one encoding only but different projects are in
        different encoding.

        As i can see trying to detect encoding from individual project settings would be
        very hard. And there are other IDE's and handwritten build.xml's that use
        different scheme. Simple path pattern to encoding would be simpliest but still
        working solution. Flexibility can be added with settings for default encoding
        and path patterns where encoding differs (so one have not to specify path
        pattern/encoding for every project in workspace). Or somethig like that.

        unr303 added a comment - We use netbeans that uses ant to build projects: build.xml includes build-impl.xml that reads projects.properties and there are source.encoding=UTF-8 or source.encoding=windows-1251. Software consists of multiple projects (modules, libraries, core, etc). Structure of workspace after all checkouts is done is like so: core/corelib1 (project with utf-8 sources) core/corelib2 (project with utf-8 sources) core/kernel (legacy project with cp1251 sources) product/module1 (legacy project with cp1251 sources) product/module2 (project with utf-8 sources) product/build.xml (this simply refers to build.xml in all other projects to build everything) Each project have all files in one encoding only but different projects are in different encoding. As i can see trying to detect encoding from individual project settings would be very hard. And there are other IDE's and handwritten build.xml's that use different scheme. Simple path pattern to encoding would be simpliest but still working solution. Flexibility can be added with settings for default encoding and path patterns where encoding differs (so one have not to specify path pattern/encoding for every project in workspace). Or somethig like that.

        Ulli Hafner added a comment -

        I added a defaultEncoding configuration option to the plug-ins checkstyle, pmd,
        findbugs, warnings and tasks.

        This option should be used by the source display and the various scanners. Could
        someone please verify this patch?

        Ulli Hafner added a comment - I added a defaultEncoding configuration option to the plug-ins checkstyle, pmd, findbugs, warnings and tasks. This option should be used by the source display and the various scanners. Could someone please verify this patch?

        sogabe added a comment -

        OS: Windows XP encoding Windows-31J
        source encoding: UTF-8
        AP server: winstone

        I tested checkstyle and task plugin with setting default encoding "UTF-8".
        But characters are garbled.

        Maybe winstone returns response with 'charset="ISO-8859-1"' not UTF-8.
        So you need the following snippet in jelly files.

        attached checkstyle_plugin.patch works for me.

        sogabe added a comment - OS: Windows XP encoding Windows-31J source encoding: UTF-8 AP server: winstone I tested checkstyle and task plugin with setting default encoding "UTF-8". But characters are garbled. Maybe winstone returns response with 'charset="ISO-8859-1"' not UTF-8. So you need the following snippet in jelly files. attached checkstyle_plugin.patch works for me.

        sogabe added a comment -

        Created an attachment (id=493)
        patch for checkstyle plugin

        sogabe added a comment - Created an attachment (id=493) patch for checkstyle plugin

        Ulli Hafner added a comment -

        Thanks, I applied your patch to the other plug-ins, too. Additionally, I added
        the same header for the source code viewer jelly file. I hope that that works
        now in most cases.

        This patch will be available in the upcoming releases of my plug-ins. I'll close
        this issue, please reopen or create a new issue if something is not yet working.
        For the per file configuration, please open another feature request...

        Ulli Hafner added a comment - Thanks, I applied your patch to the other plug-ins, too. Additionally, I added the same header for the source code viewer jelly file. I hope that that works now in most cases. This patch will be available in the upcoming releases of my plug-ins. I'll close this issue, please reopen or create a new issue if something is not yet working. For the per file configuration, please open another feature request...

          drulli Ulli Hafner
          bozaro Artem V. Navrotskiy
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

            Created:
            Updated:
            Resolved: