renderer: fix decoding issues (#29)

This commit is contained in:
Sina Atalay 2024-03-27 23:04:49 +01:00
parent 990d5108a2
commit d24d33e208
1 changed files with 5 additions and 1 deletions

View File

@ -956,7 +956,11 @@ def latex_to_pdf(
"If you can't solve the problem, please open an issue on GitHub.",
)
else:
output = output[0].decode("utf-8")
try:
output = output[0].decode("utf-8")
except UnicodeDecodeError:
output = output[0].decode("latin-1")
if "Rerun to get" in output:
# Run TinyTeX again to get the references right:
subprocess.run(