[JIRA] Created: (HUDSON-6203) Git plugin uses default encoding to read change log file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Created: (HUDSON-6203) Git plugin uses default encoding to read change log file

Hudson issues mailing list
Git plugin uses default encoding to read change log file
--------------------------------------------------------

                 Key: HUDSON-6203
                 URL: http://issues.hudson-ci.org/browse/HUDSON-6203
             Project: Hudson
          Issue Type: Bug
          Components: git
    Affects Versions: current
         Environment: Windows Server 2003 R2, Cygwin 1.7.2, git 1.7.0.4, Hudson 1.353, GIT plugin 0.8.2
            Reporter: bleis


[Problem]
When we look at changes, commit log is garbled.

[Cause]
Git assumes that commit log is written by utf-8, if we don't set "i18n.commitencoding" property.

hudson.plugins.git.GitChangeLogParser class uses java.io.FileReader class at 27.
java.io.FileReader class uses the default character encoding to read file.
Japanese version of Windows uses "MS932" as default character encoding.

So we run hudson on it, commit log is garbled.

[Solution]
use java.io.FileInputStream and java.io.InputStreamReader classes instead of java.io.FileReader class.
java.io.InputStreamReader class has a constructor that is able to set the encoding.

[Example]
BufferedReader rdr = null;
try {
    // fetch encoding out of configuration
    rdr = new BufferedReader(new InputStreamReader(new FileInputStream(changelogFile), encoding));
    /* ... */
} finally {
    // close rdr whether constructors throw exception or not
    if (rdr != null) rdr.close();
}

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Assigned: (HUDSON-6203) Git plugin uses default encoding to read change log file

Hudson issues mailing list

     [ http://issues.hudson-ci.org/browse/HUDSON-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sogabe reassigned HUDSON-6203:
------------------------------

    Assignee: magnayn

> Git plugin uses default encoding to read change log file
> --------------------------------------------------------
>
>                 Key: HUDSON-6203
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-6203
>             Project: Hudson
>          Issue Type: Bug
>          Components: git
>    Affects Versions: current
>         Environment: Windows Server 2003 R2, Cygwin 1.7.2, git 1.7.0.4, Hudson 1.353, GIT plugin 0.8.2
>            Reporter: bleis
>            Assignee: magnayn
>
> [Problem]
> When we look at changes, commit log is garbled.
> [Cause]
> Git assumes that commit log is written by utf-8, if we don't set "i18n.commitencoding" property.
> hudson.plugins.git.GitChangeLogParser class uses java.io.FileReader class at 27.
> java.io.FileReader class uses the default character encoding to read file.
> Japanese version of Windows uses "MS932" as default character encoding.
> So we run hudson on it, commit log is garbled.
> [Solution]
> use java.io.FileInputStream and java.io.InputStreamReader classes instead of java.io.FileReader class.
> java.io.InputStreamReader class has a constructor that is able to set the encoding.
> [Example]
> BufferedReader rdr = null;
> try {
>     // fetch encoding out of configuration
>     rdr = new BufferedReader(new InputStreamReader(new FileInputStream(changelogFile), encoding));
>     /* ... */
> } finally {
>     // close rdr whether constructors throw exception or not
>     if (rdr != null) rdr.close();
> }

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Resolved: (HUDSON-6203) Git plugin uses default encoding to read change log file

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

     [ http://issues.hudson-ci.org/browse/HUDSON-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

abayer resolved HUDSON-6203.
----------------------------

    Resolution: Fixed

Resolved

> Git plugin uses default encoding to read change log file
> --------------------------------------------------------
>
>                 Key: HUDSON-6203
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-6203
>             Project: Hudson
>          Issue Type: Bug
>          Components: git
>    Affects Versions: current
>         Environment: Windows Server 2003 R2, Cygwin 1.7.2, git 1.7.0.4, Hudson 1.353, GIT plugin 0.8.2
>            Reporter: bleis
>            Assignee: magnayn
>
> [Problem]
> When we look at changes, commit log is garbled.
> [Cause]
> Git assumes that commit log is written by utf-8, if we don't set "i18n.commitencoding" property.
> hudson.plugins.git.GitChangeLogParser class uses java.io.FileReader class at 27.
> java.io.FileReader class uses the default character encoding to read file.
> Japanese version of Windows uses "MS932" as default character encoding.
> So we run hudson on it, commit log is garbled.
> [Solution]
> use java.io.FileInputStream and java.io.InputStreamReader classes instead of java.io.FileReader class.
> java.io.InputStreamReader class has a constructor that is able to set the encoding.
> [Example]
> BufferedReader rdr = null;
> try {
>     // fetch encoding out of configuration
>     rdr = new BufferedReader(new InputStreamReader(new FileInputStream(changelogFile), encoding));
>     /* ... */
> } finally {
>     // close rdr whether constructors throw exception or not
>     if (rdr != null) rdr.close();
> }

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-6203) Git plugin uses default encoding to read change log file

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=143402#action_143402 ]

dogfood commented on HUDSON-6203:
---------------------------------

Integrated in !http://ci.hudson-labs.org/images/16x16/blue.gif! [plugins_hudson-git-plugin #35|http://ci.hudson-labs.org/job/plugins_hudson-git-plugin/35/]
     

> Git plugin uses default encoding to read change log file
> --------------------------------------------------------
>
>                 Key: HUDSON-6203
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-6203
>             Project: Hudson
>          Issue Type: Bug
>          Components: git
>    Affects Versions: current
>         Environment: Windows Server 2003 R2, Cygwin 1.7.2, git 1.7.0.4, Hudson 1.353, GIT plugin 0.8.2
>            Reporter: bleis
>            Assignee: magnayn
>
> [Problem]
> When we look at changes, commit log is garbled.
> [Cause]
> Git assumes that commit log is written by utf-8, if we don't set "i18n.commitencoding" property.
> hudson.plugins.git.GitChangeLogParser class uses java.io.FileReader class at 27.
> java.io.FileReader class uses the default character encoding to read file.
> Japanese version of Windows uses "MS932" as default character encoding.
> So we run hudson on it, commit log is garbled.
> [Solution]
> use java.io.FileInputStream and java.io.InputStreamReader classes instead of java.io.FileReader class.
> java.io.InputStreamReader class has a constructor that is able to set the encoding.
> [Example]
> BufferedReader rdr = null;
> try {
>     // fetch encoding out of configuration
>     rdr = new BufferedReader(new InputStreamReader(new FileInputStream(changelogFile), encoding));
>     /* ... */
> } finally {
>     // close rdr whether constructors throw exception or not
>     if (rdr != null) rdr.close();
> }

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]