From ecd07d50b9851ed2463f5e9ccbfc49a57653c3d6 Mon Sep 17 00:00:00 2001 From: Bernhard Fisseni Date: Tue, 7 Jul 2015 15:33:32 +0200 Subject: [PATCH] Assume UTF-8 for text encoding addresses #33 Just using `open` tends to expect ASCII encoding. UTF-8 seems to be a more sensible default. Maybe in the long run, an encoding parameter makes sense? --- CLI/criticParser_CLI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLI/criticParser_CLI.py b/CLI/criticParser_CLI.py index 8f44c66..9d2c7e4 100755 --- a/CLI/criticParser_CLI.py +++ b/CLI/criticParser_CLI.py @@ -318,7 +318,7 @@ def markProcess(group_object): if args.source: - inputFile = open(args.source, "r") + inputFile = codecs.open(args.source, "r", encoding="UTF-8") inputText = inputFile.read() inputFile.close() else: