Skip to content

Writing UTF-8 ics files on Windows #276

Answered by mo-gm
mo-gm asked this question in Q&A
Jan 16, 2021 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

/edit: Found me old answer. but i can not mark @C4ptainCrunch s reply as answer. So here it is marked for future readers:

So it worked with these two code-snippets:

with open('my.ics', 'w', encoding="utf8") as my_file:
    my_file.writelines(c)

with open('my.ics', 'wb') as my_file:
    my_file.write(str(c).encode('utf-8'))

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@mo-gm
Comment options

@C4ptainCrunch
Comment options

@N-Coder
Comment options

@mo-gm
Comment options

@N-Coder
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by mo-gm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants