Try utf-16 if utf-8 fails
This commit is contained in:
parent
e3dc53ee7d
commit
0f38caf97a
@ -49,9 +49,9 @@ def process_file(in_file, file_type, encoding) -> ConfigParser:
|
|||||||
bot_config = json.load(f)
|
bot_config = json.load(f)
|
||||||
ignore_strings = bot_config['ignore_strings'][file_type]
|
ignore_strings = bot_config['ignore_strings'][file_type]
|
||||||
keep_blocks = bot_config['keep_blocks'][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() 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()
|
clean_data = list()
|
||||||
|
|
||||||
if ignore_strings:
|
if ignore_strings:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user