From ff320d9dbb45af5832a00ff8173a19d476ae9962 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 20 Nov 2023 19:20:31 +0300 Subject: [PATCH] Fix(parse_html/bkmk_parse_html.py): Open the file with known encoding --- parse_html/bkmk_parse_html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse_html/bkmk_parse_html.py b/parse_html/bkmk_parse_html.py index 4d5f9e6..922c745 100644 --- a/parse_html/bkmk_parse_html.py +++ b/parse_html/bkmk_parse_html.py @@ -211,7 +211,7 @@ def parse_html(html_text, charset=None, log=None): def parse_filename(filename, charset=None, log=None): - fp = open(filename, 'rt') + fp = open(filename, 'rt', encoding=charset) try: parser = parse_html(fp.read(), charset=charset, log=log) finally: -- 2.39.5