We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3901053 commit afe9554Copy full SHA for afe9554
python_packages/jupyter_lsp/jupyter_lsp/virtual_documents_shadow.py
@@ -41,15 +41,15 @@ def read_lines(self):
41
lines = [""]
42
try:
43
# TODO: what to do about bad encoding reads?
44
- lines = self.path.read_text().splitlines()
+ lines = self.path.read_text(encoding='utf-8').splitlines()
45
except FileNotFoundError:
46
pass
47
return lines
48
49
@run_on_executor
50
def write_lines(self):
51
self.path.parent.mkdir(parents=True, exist_ok=True)
52
- self.path.write_text("\n".join(self.lines))
+ self.path.write_text("\n".join(self.lines), encoding='utf-8')
53
54
@staticmethod
55
def trim(lines: list, character: int, side: int):
0 commit comments