Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Use utf-8 encoding to read generated .tex files. (#4334)

OliverStrait3721fb1612f6
diff --git a/manim/utils/tex_file_writing.py b/manim/utils/tex_file_writing.py
index 8c2c9c8c0..4c61bf4fa 100644
--- a/manim/utils/tex_file_writing.py
+++ b/manim/utils/tex_file_writing.py
@@ -288,7 +288,7 @@ def print_all_tex_errors(log_file: Path, tex_compiler: str, tex_file: Path) -> N
index for index, line in enumerate(tex_compilation_log) if line.startswith("!")
]
if error_indices:
- with tex_file.open() as f:
+ with tex_file.open(encoding="utf-8") as f:
tex = f.readlines()
for error_index in error_indices:
print_tex_error(tex_compilation_log, error_index, tex)