Skip to content

Commit cb109dc

Browse files
authored
Merge pull request #66656 from bnbarham/cherry-sprinkle-utf8
[5.9][Build] Read all shell output as UTF-8
2 parents 2cf1917 + d9b896a commit cb109dc

File tree

1 file changed

+2
-0
lines changed
  • utils/swift_build_support/swift_build_support

1 file changed

+2
-0
lines changed

utils/swift_build_support/swift_build_support/shell.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,10 @@ def run(*args, **kwargs):
228228
my_pipe = subprocess.Popen(
229229
*args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
230230
universal_newlines=True,
231+
encoding='utf-8',
231232
**kwargs)
232233
(output, _) = my_pipe.communicate()
234+
output = output.encode(encoding='ascii', errors='replace')
233235
ret = my_pipe.wait()
234236

235237
if lock:

0 commit comments

Comments
 (0)