From 252e2c89ea689c7a708ea2d01c4daf1383aa0cd1 Mon Sep 17 00:00:00 2001 From: 0xrgb <0xrgb@users.noreply.github.com> Date: Wed, 21 Mar 2018 11:16:45 +0900 Subject: [PATCH] Update mpir_config.py Supporting other encodings --- build.vc/mpir_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.vc/mpir_config.py b/build.vc/mpir_config.py index 96ecb3d7..3cd02581 100644 --- a/build.vc/mpir_config.py +++ b/build.vc/mpir_config.py @@ -203,7 +203,7 @@ g2_sym = compile(r'global\s+__g(\w+)') def get_symbols(setf, sym_dir): for f in setf: fn = join(mpir_root_dir, f[2], f[0] + f[1]) - with open(fn, 'r') as inf: + with open(fn, 'r', encoding='utf8', errors='replace') as inf: lines = inf.readlines() for l in lines: m = fr_sym.search(l) @@ -620,4 +620,4 @@ if debug: n, x = splitext(f) nd[n] = nd.get(n, []) + [(d, 'asm')] for x in nd: - print(x, nd[x]) \ No newline at end of file + print(x, nd[x])