[
https://issues.apache.org/jira/browse/SCM-897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17963554#comment-17963554
]
ASF GitHub Bot commented on SCM-897:
------------------------------------
jira-importer commented on issue #1118:
URL: https://github.com/apache/maven-scm/issues/1118#issuecomment-2964646843
**[Michael
Osipov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=michael-o)**
commented
As far as I can see, the error is rooted in
`org.codehaus.plexus.util.cli.StreamPumper`: `this.in = new BufferedReader( new
InputStreamReader( in ), SIZE );`. It uses the default system encoding which
does not apply for Git.
Subversion on Windows looks impossible to solve. I can't make it run in cmd
and PowerShell.
> French accent lost and replaced by weird characters in the changelog.xml
> ------------------------------------------------------------------------
>
> Key: SCM-897
> URL: https://issues.apache.org/jira/browse/SCM-897
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-scm-provider-gitexe
> Affects Versions: 1.9.4
> Environment: JDK 8, Windows 7
> Reporter: Jamel
> Priority: Major
>
> Executing changelog goal of maven-changelog-plugin will result in xml file
> with weird characters replacing french accented characters.
> You have to execute maven command on french system (in my case windows 7) to
> get the problem.
> So far, I realized that a bug may be present in the scm git-exe plugin. it
> seems that an UTF-8 stream was read as ISO-8859-1 (Westen Europe) which lead
> to corrupted message.
> I fixed the bug by passing System.getProperty("file.encoding") to --encoding
> param of "git whatchanged" command.
> {noformat}
> I added this line of code:
> cl.createArg().setValue( "--encoding=" + System.getProperty("file.encoding"));
> to
> org.apache.maven.scm.provider.git.gitexe.command.changelog.GitChangeLogCommand.createCommandLine(){noformat}
> the other way is to read the command output with the right encoding (I assume
> UTF-8).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)