From d8d37255a05909a064b21ff19f3bdd9f587b31f2 Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Wed, 21 Feb 2018 17:53:20 +0100 Subject: [PATCH] added encoding to html5tidy subcommand -- python3 --- etherdump/commands/html5tidy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etherdump/commands/html5tidy.py b/etherdump/commands/html5tidy.py index fc06d32..0b31e57 100644 --- a/etherdump/commands/html5tidy.py +++ b/etherdump/commands/html5tidy.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + from __future__ import print_function from html5lib import parse import os, sys @@ -154,7 +156,7 @@ def main (args): else: fout = sys.stdout - print (ET.tostring(doc, method=args.method), file=fout) + print (ET.tostring(doc, method=args.method, encoding="unicode"), file=fout) if fout != sys.stdout: fout.close()