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

Olivier Lamy commented on SCM-897:
----------------------------------

This project has moved from Jira to GitHub Issues. This issue was migrated to 
[apache/maven-scm#1118|https://github.com/apache/maven-scm/issues/1118]. Please 
visit the GitHub issue to view further activity, add comments, or subscribe to 
receive notifications.

> 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)

Reply via email to