FIX utf8 su ICS

This commit is contained in:
boyska 2017-05-21 00:25:10 +02:00
parent 0659b13813
commit 1625352228

View file

@ -262,7 +262,7 @@ class TalkGridDirective(Directive):
def talks_to_ics():
content = 'BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:pelican\n'
content = u'BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:pelican\n'
for t in all_talks():
content += talk_to_ics(t)
content += 'END:VCALENDAR\n'
@ -308,7 +308,7 @@ class TalksGenerator(generators.Generator):
shutil.rmtree(outdir)
shutil.copytree(self.talks[talkname]['resources'], outdir)
with open(os.path.join(self.output_path, TALK_ICS), 'w') as buf:
buf.write(talks_to_ics())
buf.write(talks_to_ics().encode('utf8'))
def add_talks_option_defaults(pelican):