[jira] [Commented] (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=16577373#comment-16577373 ] Michael Osipov commented on SCM-834: Can someone provide me a sample project configuration? > 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 >Priority: Major > Fix For: waiting-for-feedback > > > 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 (v7.6.3#76005)
[jira] [Commented] (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 commented on SCM-834: --- 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)
[jira] [Commented] (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=15578577#comment-15578577 ] Michael Osipov commented on SCM-834: [~tgr], do you want to create a PR based on my previous comment? > 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.4#6332)
[jira] [Commented] (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=15352935#comment-15352935 ] Michael Osipov commented on SCM-834: Sounds reasonable but there are more spots than this: {noformat} NameLineTextPath DiffMojo.java 94 FileUtils.fileWrite( outputFile.getAbsolutePath(), result.getPatch() ); D:\Entwicklung\Projekte\maven-scm\maven-scm-plugin\src\main\java\org\apache\maven\scm\plugin IntegrityDiffCommand.java 90 // a NPE in org.codehaus.plexus.util.FileUtils.fileWrite(FileUtils.java:426) D:\Entwicklung\Projekte\maven-scm\maven-scm-providers\maven-scm-provider-integrity\src\main\java\org\apache\maven\scm\provider\integrity\command\diff AbstractCvsCheckInCommand.java 73 FileUtils.fileWrite( messageFile.getAbsolutePath(), message ); D:\Entwicklung\Projekte\maven-scm\maven-scm-providers\maven-scm-providers-cvs\maven-scm-provider-cvs-commons\src\main\java\org\apache\maven\scm\provider\cvslib\command\checkin GitCheckInCommand.java 74 FileUtils.fileWrite( messageFile.getAbsolutePath(), message ); D:\Entwicklung\Projekte\maven-scm\maven-scm-providers\maven-scm-providers-git\maven-scm-provider-gitexe\src\main\java\org\apache\maven\scm\provider\git\gitexe\command\checkin GitTagCommand.java 80 FileUtils.fileWrite( messageFile.getAbsolutePath(), scmTagParameters.getMessage() ); D:\Entwicklung\Projekte\maven-scm\maven-scm-providers\maven-scm-providers-git\maven-scm-provider-gitexe\src\main\java\org\apache\maven\scm\provider\git\gitexe\command\tag SvnBranchCommand.java 79 FileUtils.fileWrite( messageFile.getAbsolutePath(), scmBranchParameters.getMessage() ); D:\Entwicklung\Projekte\maven-scm\maven-scm-providers\maven-scm-providers-svn\maven-scm-provider-svnexe\src\main\java\org\apache\maven\scm\provider\svn\svnexe\command\branch SvnCheckInCommand.java 63 FileUtils.fileWrite( messageFile.getAbsolutePath(), message ); D:\Entwicklung\Projekte\maven-scm\maven-scm-providers\maven-scm-providers-svn\maven-scm-provider-svnexe\src\main\java\org\apache\maven\scm\provider\svn\svnexe\command\checkin SvnMkdirCommand.java60 FileUtils.fileWrite( messageFile.getAbsolutePath(), message ); D:\Entwicklung\Projekte\maven-scm\maven-scm-providers\maven-scm-providers-svn\maven-scm-provider-svnexe\src\main\java\org\apache\maven\scm\provider\svn\svnexe\command\mkdir SvnTagCommand.java 103 FileUtils.fileWrite( messageFile.getAbsolutePath(), scmTagParameters == null ? "" : scmTagParameters D:\Entwicklung\Projekte\maven-scm\maven-scm-providers\maven-scm-providers-svn\maven-scm-provider-svnexe\src\main\java\org\apache\maven\scm\provider\svn\svnexe\command\tag {noformat} and {{SvnCommandLineUtils#addTarget}}. We need a more general approach because this is used through entire Maven SCM. One can either add {{messageEncoding}} with default value {{UTF-8}} or reuse these maybe: {code:xml} UTF-8 UTF-8 {code} At least we need a stable encoding because this is internal code. {{UTF-8}} is the safest bet here. > 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.4#6332)