Skip to content

Commit

Permalink
Merge pull request #518 from deroskarmodulo/master
Browse files Browse the repository at this point in the history
Fix merge_all.py to use encoding='UTF-8' in open() calls
  • Loading branch information
dranikpg authored Aug 15, 2022
2 parents 87cf68f + 5642509 commit df0b50b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/merge_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
print(headers)
edges = defaultdict(list)
for header in headers:
d = open(pt.join(header_path, header)).read()
d = open(pt.join(header_path, header), encoding='UTF-8').read()
match = re_depends.findall(d)
for m in match:
actual_m = m
Expand Down Expand Up @@ -88,10 +88,10 @@ def dfs(x):
print(order)
build = [lsc, '#pragma once']
for header in order:
d = open(pt.join(header_path, header)).read()
d = open(pt.join(header_path, header), encoding='UTF-8').read()
d_no_depend = re_depends.sub(lambda x: '', d)
d_no_pragma = re_pragma.sub(lambda x: '', d_no_depend)
build.append(d_no_pragma)
#build.append('\n')

open(output_path, 'w').write('\n'.join(build))
open(output_path, 'w', encoding='UTF-8').write('\n'.join(build))

0 comments on commit df0b50b

Please sign in to comment.