Update mpir_config.py

Supporting other encodings
This commit is contained in:
0xrgb 2018-03-21 11:16:45 +09:00 committed by GitHub
parent f637bdb189
commit 252e2c89ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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])
print(x, nd[x])