Skip to content

Commit

Permalink
fix encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
reox committed May 1, 2018
1 parent a0759ac commit fd4f3a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions androarsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ def main(arscobj, outp=None, package=None, typ=None, locale=None):
buff = etree.tostring(etree.fromstring(x), pretty_print=True, encoding="UTF-8")

if outp:
with open(outp, "w") as fd:
with open(outp, "wb") as fd:
fd.write(buff)
else:
print(buff)
print(buff.decode("UTF-8"))


if __name__ == "__main__":
Expand Down Expand Up @@ -129,4 +129,4 @@ def main(arscobj, outp=None, package=None, typ=None, locale=None):
sys.exit(0)


main(arscobj, package=args.package, typ=args.type, locale=args.locale)
main(arscobj, outp=args.output, package=args.package, typ=args.type, locale=args.locale)

0 comments on commit fd4f3a7

Please sign in to comment.