skills: Open all skill data files as utf8 encoded

Signed-off-by: Alistair Francis <alistair.francis@wdc.com> and Åke Forslund <ake.forslund@gmail.com>
pull/1992/head
Alistair Francis 2019-01-18 13:09:34 -08:00 committed by Åke Forslund
parent 65a7197519
commit edafce059d
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ def load_vocab_from_file(path, vocab_type, bus):
skill_id(str): skill id
"""
if path.endswith('.voc'):
with open(path, 'r') as voc_file:
with open(path, 'r', encoding='utf8') as voc_file:
for line in voc_file.readlines():
if line.startswith("#"):
continue
@ -59,7 +59,7 @@ def load_regex_from_file(path, bus, skill_id):
bus: Mycroft messagebus connection
"""
if path.endswith('.rx'):
with open(path, 'r') as reg_file:
with open(path, 'r', encoding='utf8') as reg_file:
for line in reg_file.readlines():
if line.startswith("#"):
continue