[Kimchi-devel] [PATCH] [Wok 1/2] Issue #101: In runcommand, enabling UTF-8 characters support in command output.

archus at linux.vnet.ibm.com archus at linux.vnet.ibm.com
Mon May 23 08:13:50 UTC 2016


From: Archana Singh <archus at linux.vnet.ibm.com>

Command output needs to be english for programmatically parsing of output.
"LC_ALL = C" set the all LC_* to en_US and charset to ASCII.

Replaced C with "en_US.UTF-8" enable charset to UTF-8.

Signed-off-by: Archana Singh <archus at linux.vnet.ibm.com>
---
 src/wok/utils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wok/utils.py b/src/wok/utils.py
index b37518f..3783685 100644
--- a/src/wok/utils.py
+++ b/src/wok/utils.py
@@ -226,9 +226,9 @@ def run_command(cmd, timeout=None, silent=False, tee=None,
 
     if env_vars is None:
         env_vars = os.environ.copy()
-        env_vars['LC_ALL'] = 'C'
+        env_vars['LC_ALL'] = 'en_US.UTF-8'
     elif env_vars.get('LC_ALL') is None:
-        env_vars['LC_ALL'] = 'C'
+        env_vars['LC_ALL'] = 'en_US.UTF-8'
 
     try:
         proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
-- 
1.8.3.1




More information about the Kimchi-devel mailing list