From 671fe23990f219950e880fa2f6ebc1f722287b8b Mon Sep 17 00:00:00 2001 From: slamp Date: Tue, 29 May 2018 11:08:46 +0200 Subject: [PATCH] Force utf8 to solve issue https://github.com/aviaryan/VSCodeNotebook/issues/10 --- vscode_notebook/cryptlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode_notebook/cryptlib.py b/vscode_notebook/cryptlib.py index 9acd7cf..813b727 100644 --- a/vscode_notebook/cryptlib.py +++ b/vscode_notebook/cryptlib.py @@ -106,10 +106,10 @@ def get_file_list(): def update_file(funcptr, flist, key): failed = False for file in flist: - fptr = open(file, 'r') + fptr = open(file, 'r', encoding='utf8') data = fptr.read() fptr.close() - fptr = open(file, 'w') + fptr = open(file, 'w', encoding='utf8') try: newData = funcptr(key, data) except Exception: