From 727c40a082ae30059b783c9a9a4d62f06597d176 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 12 Feb 2008 21:44:10 +0000 Subject: [PATCH] current_charset is only needed in main. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@175 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- Robots/parse_html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Robots/parse_html.py b/Robots/parse_html.py index 888e27c..bc50767 100755 --- a/Robots/parse_html.py +++ b/Robots/parse_html.py @@ -7,9 +7,6 @@ import codecs -from m_lib.defenc import default_encoding -current_charset = default_encoding.replace("windows-", "cp") - universal_charset = "utf-8" DEFAULT_CHARSET = "cp1251" # Stupid default for Russian Cyrillic @@ -109,6 +106,9 @@ def parse_html(filename, charset=None, log=None): if __name__ == '__main__': import sys + from m_lib.defenc import default_encoding + current_charset = default_encoding.replace("windows-", "cp") + parser = parse_html(sys.argv[1], universal_charset) print parser.charset print parser.title -- 2.39.5