From e8d3fd2c1a4764254d39fb3bac9f43cdccb3b1d4 Mon Sep 17 00:00:00 2001 From: keithsterling Date: Tue, 12 Dec 2017 15:56:29 +0000 Subject: [PATCH] Fix for writing braintree as unicode --- src/programy/parser/pattern/graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/programy/parser/pattern/graph.py b/src/programy/parser/pattern/graph.py index e7537652b..8520e6777 100644 --- a/src/programy/parser/pattern/graph.py +++ b/src/programy/parser/pattern/graph.py @@ -256,7 +256,7 @@ def save_braintree(self, bot, clientid, filename, content): braintree += '\n' braintree += self.root.to_xml(bot, clientid) braintree += '\n' - with open(filename, "w+") as dump_file: + with open(filename, "w+", encoding="utf-8") as dump_file: dump_file.write(braintree) else: if logging.getLogger().isEnabledFor(logging.ERROR):