Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Serialize does not use CRLF sequence #116

Open
GustavoOS opened this issue Feb 5, 2025 · 2 comments
Open

[BUG] Serialize does not use CRLF sequence #116

GustavoOS opened this issue Feb 5, 2025 · 2 comments
Assignees

Comments

@GustavoOS
Copy link

Current Behavior:

  • Generates string unix style (LF endings)

Expected Behavior:

  • CRLF endings, following RFC 5545.3.1

Steps To Reproduce:

  1. Create a calendar
  2. Call calendar.Serialize()

Anything else:

RFC 5545.3.1 states that lines should be delimited by CRLF sequence

@GustavoOS
Copy link
Author

It turns out that this is simply a bad default.
A workaround for this is to set explicit endings on serialize:

calendar.Serialize(ics.WithNewLineWindows)

@arran4
Copy link
Owner

arran4 commented Feb 5, 2025

Hey,

That was a recent change too. I will look into it, but it might have to be a documentation improvement for the mean time. (I mean there is a massive scope for improvement there already!)

@arran4 arran4 self-assigned this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants