From d41ae5266bbfed530b31cc039ab5561c515872ea Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Fri, 15 Jan 2016 10:42:33 +0100 Subject: [PATCH] added encoding on et.tostring --- etherdump/commands/pull.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etherdump/commands/pull.py b/etherdump/commands/pull.py index 41ef08f..4f7031c 100644 --- a/etherdump/commands/pull.py +++ b/etherdump/commands/pull.py @@ -178,7 +178,7 @@ storing enough information to reconstruct (or understand an error occurred) html5tidy(doc, indent=True, title=padid, scripts="../versions.js", links=links) with open(ver["path"], "w") as f: # f.write(html.encode("utf-8")) - print (ET.tostring(doc, method="html", encoding="utf-8"), file=f) + print (ET.tostring(doc, method="html", encoding="unicode").encode("utf-8"), file=f) # Process text, html, dhtml, all options if args.all or args.html: @@ -195,7 +195,7 @@ storing enough information to reconstruct (or understand an error occurred) html5tidy(doc, indent=True, title=padid, scripts="../versions.js", links=links) with open(ver["path"], "w") as f: # f.write(html.encode("utf-8")) - print (ET.tostring(doc, method="html", encoding="utf-8"), file=f) + print (ET.tostring(doc, method="html", encoding="unicode").encode("utf-8"), file=f) # output meta if args.all or args.meta: