From 0f38caf97a72f579c06334f1518ed664d8e11130 Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Wed, 9 May 2018 16:05:05 -0800 Subject: [PATCH] Try utf-16 if utf-8 fails --- exts/imports/process_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exts/imports/process_files.py b/exts/imports/process_files.py index 3923b35..00d4822 100644 --- a/exts/imports/process_files.py +++ b/exts/imports/process_files.py @@ -49,9 +49,9 @@ def process_file(in_file, file_type, encoding) -> ConfigParser: bot_config = json.load(f) ignore_strings = bot_config['ignore_strings'][file_type] keep_blocks = bot_config['keep_blocks'][file_type] - data = in_file.readlines() + # data = in_file.readlines() # data = [line.decode() for line in in_file] - # data = [line.decode(encoding=encoding) for line in in_file] + data = [line.decode(encoding=encoding) for line in in_file] clean_data = list() if ignore_strings: