X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=bin%2Fget_html_encoding.py;h=4ffb44998588cfc87549c99c295eb103d8701725;hb=1751a6dde6882ca2ec77adb6ae6181d05701147c;hp=8fd9656a2bc5087af7163135305b563661071da8;hpb=f46bd4d41cc7f243bc8a321effee5200aa69e709;p=dotfiles.git diff --git a/bin/get_html_encoding.py b/bin/get_html_encoding.py index 8fd9656..4ffb449 100755 --- a/bin/get_html_encoding.py +++ b/bin/get_html_encoding.py @@ -62,12 +62,12 @@ if __name__ == '__main__': import sys parser = parse_html(sys.argv[1]) if hasattr(parser, "charset"): - print parser.charset + print(parser.charset) else: import chardet charset = chardet.detect(open(sys.argv[1]).read())["encoding"] if charset in ("ISO-8859-2", "MacCyrillic"): charset = "cp1251" - print charset + print(charset) except: pass