Skip to content

Commit

Permalink
force utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoody256 committed Apr 29, 2022
1 parent d37d93d commit c046aa8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SCons/Tool/ninja/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def ninja_builder(env, target, source):

# execute the ninja build at the end of SCons, trying to
# reproduce the output like a ninja build would
sys.stdout = open(sys.stdout.fileno(), mode='w', encoding='utf-8', buffering=1)
def execute_ninja():

proc = subprocess.Popen(cmd,
Expand All @@ -102,7 +103,7 @@ def execute_ninja():
universal_newlines=True,
env=os.environ if env["PLATFORM"] == "win32" else env['ENV']
)
fp = io.open(proc.stdout.fileno(), mode="r", encoding="utf-8", closefd=False)
fp = io.open(proc.stdout.fileno(), mode="r", encoding='utf-8', closefd=False)
for stdout_line in iter(fp.readline, ""):
yield stdout_line
proc.stdout.close()
Expand Down

0 comments on commit c046aa8

Please sign in to comment.