Skip to content

Commit 84551ad

Browse files
committed
Fixed encoding issue by enforcing utf-8 read. Fixed #92
1 parent 427808c commit 84551ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

views/challenge.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ def _load_challenges(root_dir: Path) -> dict[ChallengeKey, Challenge]:
114114
# Try to read the optional hints file
115115
hints_file = challenge_folder / "hints.md"
116116
if hints_file.exists():
117-
hints = hints_file.read_text().strip()
117+
hints = hints_file.read_text(encoding="utf-8").strip()
118118
else:
119119
hints = None
120120

121121
key = ChallengeKey.from_str(challenge_folder.name)
122122
challenges[key] = Challenge(
123123
name=key.name,
124124
level=key.level,
125-
code=question_source.read_text(),
125+
code=question_source.read_text(encoding="utf-8"),
126126
hints=hints,
127127
)
128128
return challenges

0 commit comments

Comments
 (0)