From c279fd9f2e7409842d25f0995cbfa381d1683548 Mon Sep 17 00:00:00 2001 From: Carsten Varming Date: Thu, 3 May 2018 03:06:58 +0000 Subject: [PATCH] Specify encoding of source files in mk_util.py --- scripts/mk_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mk_util.py b/scripts/mk_util.py index 99de61703..3e40187c3 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -780,7 +780,7 @@ def extract_c_includes(fname): # We should generate and error for any occurrence of #include that does not match the previous pattern. non_std_inc_pat = re.compile(".*#include.*") - f = open(fname, 'r') + f = open(fname, encoding='utf-8', mode='r') linenum = 1 for line in f: m1 = std_inc_pat.match(line)