From 56c901eb8b99c58580a8db35488dbcae42fab8eb Mon Sep 17 00:00:00 2001 From: KF Date: Mon, 4 Nov 2019 20:10:03 -0600 Subject: [PATCH] * use utf-8 encoding on readstatic --- onionr/utils/readstatic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onionr/utils/readstatic.py b/onionr/utils/readstatic.py index c61fd0c3..d9343be7 100644 --- a/onionr/utils/readstatic.py +++ b/onionr/utils/readstatic.py @@ -30,6 +30,6 @@ def read_static(file:str, ret_bin:bool=False)->Union[str, bytes]: mode = 'rb' else: mode = 'r' - with open(static_file, mode) as f: + with open(static_file, mode, encoding='utf-8') as f: data = f.read() return data