diff src/hgrunner.cpp @ 408:005633eed862

Add uniDecode, and use it when parsing logs so as to decode "\uABCD" substrings. Also force Hg encoding to utf-8.
author Chris Cannam
date Mon, 06 Jun 2011 21:20:11 +0100
parents b45e6cd9f1d4
children 66ec8b2ee946
line wrap: on
line diff
--- a/src/hgrunner.cpp	Thu May 26 15:52:11 2011 +0100
+++ b/src/hgrunner.cpp	Mon Jun 06 21:20:11 2011 +0100
@@ -286,7 +286,7 @@
 void HgRunner::dataReadyStdout()
 {
     DEBUG << "dataReadyStdout" << endl;
-	if (!m_proc) return;
+    if (!m_proc) return;
     QString chunk = QString::fromUtf8(m_proc->readAllStandardOutput());
     if (!checkPrompts(chunk)) {
         m_stdout += chunk;
@@ -296,7 +296,7 @@
 void HgRunner::dataReadyStderr()
 {
     DEBUG << "dataReadyStderr" << endl;
-	if (!m_proc) return;
+    if (!m_proc) return;
     QString chunk = QString::fromUtf8(m_proc->readAllStandardError());
     DEBUG << chunk;
     if (!checkPrompts(chunk)) {
@@ -457,6 +457,7 @@
 
     env.insert("LANG", "en_US.utf8");
     env.insert("LC_ALL", "en_US.utf8");
+    env.insert("HGENCODING", "utf8");
     env.insert("HGPLAIN", "1");
     m_proc->setProcessEnvironment(env);