X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=bin%2Ficonvxml.py;h=2892a919d70195bcebb0f62ad55277f915f844a3;hb=7c8abf339f6f103cf25d5f6c0d80bc6ae8ed75b6;hp=86eb66dbad906fc388f6c85ccc92d5dd8a446b2c;hpb=f46bd4d41cc7f243bc8a321effee5200aa69e709;p=dotfiles.git diff --git a/bin/iconvxml.py b/bin/iconvxml.py index 86eb66d..2892a91 100755 --- a/bin/iconvxml.py +++ b/bin/iconvxml.py @@ -20,9 +20,9 @@ if arguments: infile = open(file) try: for line in infile: - sys.stdout.write(unicode(line, from_charset, "replace").encode(to_charset, "xmlcharrefreplace")) + sys.stdout.write(line.decode(from_charset, "replace").encode(to_charset, "xmlcharrefreplace")) except: infile.close() else: for line in sys.stdin: - sys.stdout.write(unicode(line, from_charset, "replace").encode(to_charset, "xmlcharrefreplace")) + sys.stdout.write(line.decode(from_charset, "replace").encode(to_charset, "xmlcharrefreplace"))