From 0bd55a27f2f14dd434c828f4a061f366b39dda92 Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 13 Sep 2012 09:48:35 +0200 Subject: Fix TBs when the system is not in utf-8 by default (force every file opening to be with the utf-8 encoding) --- src/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common.py') diff --git a/src/common.py b/src/common.py index 46306cdb..3b80fa34 100644 --- a/src/common.py +++ b/src/common.py @@ -123,7 +123,7 @@ def get_os_info(): # yes, then run it and get the first line of output. text = get_output_of_command(path_to_file)[0] else: - fdes = open(path_to_file) + fdes = open(path_to_file, encoding='utf-8') text = fdes.readline().strip() # get only first line fdes.close() if path_to_file.endswith('version'): -- cgit v1.2.3