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>
This commit is contained in:
Leo.Lei
2013-10-16 15:44:41 +08:00
parent 9ef8d71e2c
commit f5f2993658

View File

@@ -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: {