Skip to content

Commit 0bb3af3

Browse files
committed
Fix system check output encoding
Fixes #1684 This commit explicitly specifies "utf-8" encoding when calling latex tools in `latextools_system_check` command. That's the encoding, which is used when calling latex commands in `make_pdf` etc. as well.
1 parent 551bd7d commit 0bb3af3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

latextools/system_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,11 +494,12 @@ def check_output(self, cmd: list[str]) -> str | None:
494494
result = subprocess.run(
495495
cmd,
496496
env=self.env,
497+
encoding="utf-8",
497498
shell=self.platform == "windows",
498499
stderr=subprocess.DEVNULL,
499500
stdout=subprocess.PIPE,
500-
text=True,
501501
timeout=30,
502+
universal_newlines=True,
502503
)
503504
return result.stdout if result.returncode == 0 else None
504505

0 commit comments

Comments
 (0)