Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ics_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
print('ERROR: output file already exists! As a safety check, this script will not overwrite an ICS file')
exit()

infh = open(in_fname, 'r')
infh = open(in_fname, 'r', encoding='utf-8')

# parsing constants
BEGIN_CALENDAR = 'BEGIN:VCALENDAR'
Expand All @@ -46,7 +46,7 @@
event_count = 0
out_event_count = 0

with open(out_fname, 'w') as outfh:
with open(out_fname, 'w', encoding='utf-8')) as outfh:
for line in infh:
if in_preamble and line.startswith(BEGIN_EVENT):
in_preamble = False
Expand Down