Skip to content

Commit e8d3fd2

Browse files
committed
Fix for writing braintree as unicode
1 parent a9ac7bc commit e8d3fd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/programy/parser/pattern/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def save_braintree(self, bot, clientid, filename, content):
256256
braintree += '<aiml>\n'
257257
braintree += self.root.to_xml(bot, clientid)
258258
braintree += '</aiml>\n'
259-
with open(filename, "w+") as dump_file:
259+
with open(filename, "w+", encoding="utf-8") as dump_file:
260260
dump_file.write(braintree)
261261
else:
262262
if logging.getLogger().isEnabledFor(logging.ERROR):

0 commit comments

Comments
 (0)