Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixed garbled commit messages on Windows
On windows changelog commit messages with unicode characters are not saved correctly to changelog.xml when CliGitAPI implementation is in use. That happens because "git whatchanged" gives byte stream of data. Commit messages in that stream are encoded in UTF-8. It is necessary to explicitly decode bytestream to strings using UTF-8 encoding, otherwise default system encoding will be used. This should fix issues: https://issues.jenkins-ci.org/browse/JENKINS-6203 https://issues.jenkins-ci.org/browse/JENKINS-14798 https://issues.jenkins-ci.org/browse/JENKINS-23091
- Loading branch information
1 parent
ae68a85
commit c99c91f
Showing
4 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
rm -rf unicodeCharsInChangelogRepo unicodeCharsInChangelogRepo.zip | ||
|
||
set -e | ||
|
||
mkdir unicodeCharsInChangelogRepo | ||
pushd unicodeCharsInChangelogRepo | ||
git init | ||
git commit --allow-empty -m "Initial empty commit" | ||
|
||
git tag v0 | ||
|
||
touch 111.txt | ||
git add . | ||
git commit -m "hello in English: hello" | ||
|
||
touch 222.txt | ||
git add . | ||
git commit -m "hello in Russian: привет (privét)" | ||
|
||
touch 333.txt | ||
git add . | ||
git commit -m "hello in Chinese: 你好 (nǐ hǎo)" | ||
|
||
touch 444.txt | ||
git add . | ||
git commit -m "hello in French: Ça va ?" | ||
|
||
touch 555.txt | ||
git add . | ||
git commit -m "goodbye in German: Tschüss" | ||
git tag vLast | ||
|
||
popd | ||
|
||
zip -r unicodeCharsInChangelogRepo.zip unicodeCharsInChangelogRepo | ||
|
||
rm -rf unicodeCharsInChangelogRepo |