From d24d33e208c7abc740434b7123f10e0b9e3df3cb Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Wed, 27 Mar 2024 23:04:49 +0100 Subject: [PATCH] renderer: fix decoding issues (#29) --- rendercv/renderer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rendercv/renderer.py b/rendercv/renderer.py index 952df1e..4579811 100644 --- a/rendercv/renderer.py +++ b/rendercv/renderer.py @@ -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(