]> git.phdru.name Git - bookmarks_db.git/blobdiff - parse_html/bkmk_parse_html.py
Fix(parse_html/bkmk_parse_html.py): Open the file with known encoding
[bookmarks_db.git] / parse_html / bkmk_parse_html.py
index 4d5f9e6d11f06ef0b587acca2b608b6443007795..922c745346ecfa8f8f9c2988ef94f85345dc167a 100644 (file)
@@ -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: