Skip to content

Commit 3e6ee26

Browse files
authored
Merge pull request #106 from bnbarham/lsp-encoding-error
[LSP] Print LSP output as ASCII
2 parents d7977c3 + 46f6a1b commit 3e6ee26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test-sourcekit-lsp/test-sourcekit-lsp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ def main():
136136
print('==== OUTPUT ====')
137137

138138
skargs = [args.sourcekit_lsp, '--sync', '-Xclangd', '-sync']
139-
p = subprocess.Popen(skargs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True, encoding='utf-8')
139+
p = subprocess.Popen(skargs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, encoding='utf-8')
140140
out, _ = p.communicate(lsp.script)
141-
print(out)
141+
print(out.encode(encoding='ascii', errors='replace')
142142
print('')
143143

144144
if p.returncode == 0:

0 commit comments

Comments
 (0)