added encoding to html5tidy subcommand -- python3
This commit is contained in:
parent
c75ae9bc7c
commit
d8d37255a0
@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from html5lib import parse
|
from html5lib import parse
|
||||||
import os, sys
|
import os, sys
|
||||||
@ -154,7 +156,7 @@ def main (args):
|
|||||||
else:
|
else:
|
||||||
fout = sys.stdout
|
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:
|
if fout != sys.stdout:
|
||||||
fout.close()
|
fout.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user