Skip to content

Commit

Permalink
Fixed encoding issue by enforcing utf-8 read. Fixed #92
Browse files Browse the repository at this point in the history
  • Loading branch information
laike9m committed Jan 19, 2024
1 parent 427808c commit 84551ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions views/challenge.py
Expand Up @@ -114,15 +114,15 @@ def _load_challenges(root_dir: Path) -> dict[ChallengeKey, Challenge]:
# Try to read the optional hints file
hints_file = challenge_folder / "hints.md"
if hints_file.exists():
hints = hints_file.read_text().strip()
hints = hints_file.read_text(encoding="utf-8").strip()
else:
hints = None

key = ChallengeKey.from_str(challenge_folder.name)
challenges[key] = Challenge(
name=key.name,
level=key.level,
code=question_source.read_text(),
code=question_source.read_text(encoding="utf-8"),
hints=hints,
)
return challenges
Expand Down

0 comments on commit 84551ad

Please sign in to comment.