From f452558f5e7b795887130891ea0c9fe6fa7022cb Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Thu, 2 Jan 2014 04:10:31 +0100 Subject: [PATCH] Force output encoding of hy2py as utf-8 Fixes hy2py in py34 --- bin/hy2py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/hy2py b/bin/hy2py index 125fd26..85186b7 100755 --- a/bin/hy2py +++ b/bin/hy2py @@ -11,15 +11,15 @@ import ast module_name = "" hst = import_file_to_hst(sys.argv[1]) -print(hst) +print(str(hst).encode("utf-8")) print("") print("") _ast = import_file_to_ast(sys.argv[1], module_name) print("") print("") -print(ast.dump(_ast)) +print(ast.dump(_ast).encode("utf-8")) print("") print("") -print(astor.codegen.to_source(_ast)) +print(astor.codegen.to_source(_ast).encode("utf-8")) import_file_to_module(module_name, sys.argv[1])