Skip to content

Commit fcb76ee

Browse files
Default to utf-8 when reading files in :class:.Code (#2703)
* Update code_mobject.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent da3e995 commit fcb76ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

manim/mobject/text/code_mobject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def __init__(
199199
self.file_name = file_name
200200
if self.file_name:
201201
self._ensure_valid_file()
202-
with open(self.file_path) as f:
202+
with open(self.file_path, encoding="utf-8") as f:
203203
self.code_string = f.read()
204204
elif code:
205205
self.code_string = code

0 commit comments

Comments
 (0)