[Freeassociation-devel] Missing LF on iCalendars
Allen Winter
winter at kde.org
Mon Feb 2 14:00:41 PST 2009
On Wednesday 28 January 2009 7:07:29 pm Allen Winter wrote:
> Hi guys,
>
> Just got a bug report for KOrganizer:
> http://bugs.kde.org/show_bug.cgi?id=182224
>
> It says
> ".ics files saved by kOrganizer terminate all lines with CR LF (ascii 13
> followed by 10) as in the DOS standard. The last line however, lacks the final
> LF. This error prevents Apple iCal from importing kOrganizer calendars. Text
> editors complain that the file is missing an end-of-line."
>
> Anyone else seeing this from other products using libical 0.4x?
> If so, anyone know how to fix libical? Of course, it could be a
> bug in KOrganizer, but I don't think so.
>
>
Replying to myself..
Turns out it was a bug in KOrganizer.
Apparently older libical versions wrote 2 '\n' chars at the end.
So KOrganizer didn't write the very last byte.
For a reason I don't know.
Now libical writes '\n\r\n\r' at the end, but still KOrganizer doesn't
write the very last byte... resulting in '\n\r\n' at the end of iCalendar file.
And Apple iCal doesn't want to import that.
Question is: do I tell KOrganizer to write all 4 bytes, or skip the last 2 bytes.
i.e. write '\n\r\n\r' at the end or only '\n\r'? does it matter?
More information about the libical-devel
mailing list