From d76179bad38289d591cd2d9cba05a12c146ce5a9 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Sun, 23 Feb 2020 23:37:55 +0100 Subject: [PATCH] fixed unicode file support --- variable_grabbler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variable_grabbler.py b/variable_grabbler.py index 32594c3..ec33c18 100644 --- a/variable_grabbler.py +++ b/variable_grabbler.py @@ -22,7 +22,7 @@ for x in parsed: file_content = file_in.read() file_in.close() - file_content = file_content.replace("%" + x + "%", parsed[x]) + file_content = file_content.decode('utf-8').replace("%" + x + "%", parsed[x]).encode('utf-8') file_out = open(fpath, "w") file_out.write(file_content)