diff options
author | Leo.Lei <leo.lei@live.com> | 2013-10-16 15:44:41 +0800 |
---|---|---|
committer | Leo.Lei <leo.lei@live.com> | 2013-10-18 04:18:51 +0200 |
commit | f5f2993658249a4f93f4b0a6170e494b59951337 (patch) | |
tree | a407b8d7524e5352e52490cf2b971a05073d1348 /src/plugins/git/gitclient.cpp | |
parent | 9ef8d71e2c62bb1d6cd2fad9f0d2408f10f5d459 (diff) | |
download | qt-creator-f5f2993658249a4f93f4b0a6170e494b59951337.tar.gz |
Git: Set commit log encoding to 'UTF-8'
To solve displaying error of commit log with non-latin characters
in the commit description editor.
Change-Id: I8fd4ccdd82c0e5a286fe7d9f694b80915ef477ff
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/git/gitclient.cpp')
-rw-r--r-- | src/plugins/git/gitclient.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index f74f4d94f1..739b50fb57 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2964,6 +2964,11 @@ bool GitClient::getCommitData(const QString &workingDirectory, commitData.commitEncoding = readConfigValue(workingDirectory, QLatin1String("i18n.commitEncoding")); + // Set default commit encoding to 'UTF-8', when it's not set, + // to solve displaying error of commit log with non-latin characters. + if (commitData.commitEncoding.isEmpty()) + commitData.commitEncoding = QLatin1String("UTF-8"); + // Get the commit template or the last commit message switch (commitData.commitType) { case AmendCommit: { |