Skip to content

Commit

Permalink
Use utf-8 encoding when loading institutions
Browse files Browse the repository at this point in the history
Thanks to @TheLime1 for pointing this out
  • Loading branch information
sanjacob authored Oct 18, 2024
1 parent 01024a0 commit f7c3340
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blackboard_sync/institutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ class Institution(BaseModel):

def load() -> list[Institution]:
db = []
db_file = Path(__file__).parent / UNIVERSITY_DB

with (Path(__file__).parent / UNIVERSITY_DB).open() as f:
with db_file.open(encoding='utf-8') as f:
db = json.load(f)

return [Institution(**uni) for uni in db]
Expand Down

0 comments on commit f7c3340

Please sign in to comment.