You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jamel (JIRA)" <ji...@apache.org> on 2017/03/17 16:57:41 UTC

[jira] [Comment Edited] (SCM-834) Git Commit encoding is platform-dependend instead of UTF-8

    [ https://issues.apache.org/jira/browse/SCM-834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15930297#comment-15930297 ] 

Jamel edited comment on SCM-834 at 3/17/17 4:57 PM:
----------------------------------------------------

I have a similar problem.
however I may not had the same warning but french accent lost and replaced by wird characters.
In my case, passing System.getProperty("file.encoding") to --encoding param of "git whatchanged" command resolve the problem.
org.apache.maven.scm.provider.git.gitexe.command.changelog.GitChangeLogCommand.createCommandLine()
I added this line of code: 
cl.createArg().setValue( "--encoding=" + System.getProperty("file.encoding"));
recompiled and installed maven-scm-provider-gitexe-1.9.4 artifact



was (Author: aljane.jamel@gmail.com):
I have a similar problem.
however I may not had the same warning but french accent lost and replaced by wird character.
In my case, passing System.getProperty("file.encoding") to --encoding param of "git whatchanged" command resolve the problem.
org.apache.maven.scm.provider.git.gitexe.command.changelog.GitChangeLogCommand.createCommandLine()
I added this line of code: 
cl.createArg().setValue( "--encoding=" + System.getProperty("file.encoding"));
recompile and install maven-scm-provider-gitexe-1.9.4 artifact


> Git Commit encoding is platform-dependend instead of UTF-8
> ----------------------------------------------------------
>
>                 Key: SCM-834
>                 URL: https://issues.apache.org/jira/browse/SCM-834
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-gitexe
>    Affects Versions: 1.9.4
>            Reporter: Tobias Gruetzmacher
>
> When doing a release with the maven-release-plugin, if you have a non-ASCII-character in your commit message (setting scmCommentPrefix to "lösung" for example), the resulting commit message has a different encoding on different operating systems. If it isn't UTF-8 (on Windows, for example), git complains with
> {code}
> Warning: commit message did not conform to UTF-8.
> You may want to amend it after fixing the message, or set the config
> variable i18n.commitencoding to the encoding your project uses.
> {code}
> AFAICS, the fix is pretty simple: Just add "UTF-8" to the call of fileWrite in [GitCheckInCommand.java|https://github.com/apache/maven-scm/blob/master/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/GitCheckInCommand.java#L74]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)