Merge pull request #3 from BlackBeltBob/fix-unicode

Fix unicode encoding problem when importing calendars from sources…
This commit is contained in:
Erik 2019-12-03 10:59:46 -08:00 committed by GitHub
commit 4be10695fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ def csv_write(icsfile):
wr = csv.writer(myfile, quoting=csv.QUOTE_ALL)
wr.writerow(headers)
for event in events:
values = (event.summary, event.uid, event.description, event.location, event.start, event.end, event.url)
values = (event.summary.encode('utf-8'), event.uid, event.description.encode('utf-8'), event.location, event.start, event.end, event.url)
wr.writerow(values)
print("Wrote to ", csvfile, "\n")
except IOError: