mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Specify UTF-8 encoding for tex files
This commit is contained in:
parent
8cac16b452
commit
4aeccd7769
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ def get_tex_config():
|
|||
get_manim_dir(), "manimlib", "tex_templates",
|
||||
SAVED_TEX_CONFIG["template_file"],
|
||||
)
|
||||
with open(template_filename, "r") as file:
|
||||
with open(template_filename, "r", encoding="utf-8") as file:
|
||||
SAVED_TEX_CONFIG["tex_body"] = file.read()
|
||||
return SAVED_TEX_CONFIG
|
||||
|
||||
|
@ -88,7 +88,7 @@ def tex_to_dvi(tex_file):
|
|||
if exit_code != 0:
|
||||
log_file = tex_file.replace(".tex", ".log")
|
||||
log.error("LaTeX Error! Not a worry, it happens to the best of us.")
|
||||
with open(log_file, "r") as file:
|
||||
with open(log_file, "r", encoding="utf-8") as file:
|
||||
for line in file.readlines():
|
||||
if line.startswith("!"):
|
||||
log.debug(f"The error could be: `{line[2:-1]}`")
|
||||
|
|
Loading…
Add table
Reference in a new issue