Skip to content

Commit

Permalink
fixed issue #887
Browse files Browse the repository at this point in the history
  • Loading branch information
eirannejad committed May 1, 2020
1 parent ac8c135 commit 4b12886
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
INDEX_FORMAT = '{{:0{digits}}}'


EXPORT_ENCODING = 'utf_16_le'
if HOST_APP.is_newer_than(2020):
EXPORT_ENCODING = 'utf_8'


AvailableDoc = namedtuple('AvailableDoc', ['name', 'hash', 'linked'])

NamingFormatter = namedtuple('NamingFormatter', ['template', 'desc'])
Expand Down Expand Up @@ -524,7 +529,7 @@ def _get_schedule_text_data(self, schedule_view):

sched_data = []
try:
with codecs.open(schedule_data_file, 'r', 'utf_16_le') \
with codecs.open(schedule_data_file, 'r', EXPORT_ENCODING) \
as sched_data_file:
return [x.strip() for x in sched_data_file.readlines()]
except Exception as open_err:
Expand Down

0 comments on commit 4b12886

Please sign in to comment.