Skip to content

Commit

Permalink
Do not read files as binary in templatehelper.readfile().
Browse files Browse the repository at this point in the history
  • Loading branch information
nomike committed Sep 18, 2024
1 parent c42774d commit 4417529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templatehelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def readfile(path, default=None):
"""
if not os.path.exists(path) and default:
return default
with open(path, 'rb') as requested_file:
with open(path, 'r', encoding=locale.getpreferredencoding()) as requested_file:
return requested_file.read()

def getfasicon(path):
Expand Down

0 comments on commit 4417529

Please sign in to comment.