From: Oleg Broytman Date: Mon, 20 Nov 2023 16:20:31 +0000 (+0300) Subject: Fix(parse_html/bkmk_parse_html.py): Open the file with known encoding X-Git-Tag: 5.0.0~9 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=ff320d9dbb45af5832a00ff8173a19d476ae9962;p=bookmarks_db.git Fix(parse_html/bkmk_parse_html.py): Open the file with known encoding --- 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: