emersion / go-ical

An iCalendar library for Go
MIT License
53 stars 11 forks source link

RFC line length is not support when encoding #18

Closed dploeger closed 1 year ago

dploeger commented 1 year ago

As RFC5545 states:

Lines of text SHOULD NOT be longer than 75 octets, excluding the line break. Long content lines SHOULD be split into a multiple line representations using a line "folding" technique.

This is currently not supported. Lines are completely posted into the output without folding.

emersion commented 1 year ago

I would rather not. This is just a SHOULD. I've implemented it for go-message and it caused a ton of regressions. It's very tricky to get right and doesn't provide any meaningful value.

dploeger commented 1 year ago

Ah, you're right. I couldn't import a calendar file from go-ical into Confluence Calendars but after all it wasn't the line length but something else. Fair enough.

Dynom commented 1 year ago

FWIW, I've been using this and I've not yet had any problems with it https://github.com/emersion/go-ical/compare/master...Dynom:go-ical:AddingLineFolding

I needed it because of a buggy implementation with an integration which had a hard fail on a surplus of 75 octets.

dploeger commented 1 year ago

Would you accept a PR from @Dynom about this, @emersion ?

emersion commented 1 year ago

No.

Dynom commented 1 year ago

Would you accept a PR from @Dynom about this, @emersion ?

It's an old topic: https://github.com/emersion/go-ical/pull/5