Bug 140650

Summary: Folding breaks local iCal files (Only LF + space instead of CRLF + space)
Product: [Applications] korganizer Reporter: Guido Diepen <guidodiepen>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description Guido Diepen 2007-01-26 10:11:06 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Debian testing/unstable Packages

The iCal specification states that long lines should be folded in the following way:
This is a long line that continues[CRLF]
[ws]on a second line

where [ws] is white space.


KOrganizer handles it currently like this for local files:
This is a long line that continues[LF]
[ws]on a second line



Previously I was making use of a remote iCal file through webDav, and then it is implemented perfectly. For testing purposes, I changed to a local iCal file for the moment and I found out that reading the iCal file works perfect: all items are displayed in KOrganizer. But when I change one of the items, the iCal file is rewritten to disk and the folding part breaks the iCal specifications since only a LF followed by a white space is used for folding the long lines. When I try to read this file with another program it gives an error that an unknown PROPERTY has been introduced.

Possible solution is to add CRLF for cases where you are folding and otherwise only the line-separator that is default for the current OS.

Regards,

Guido Diepen
Comment 1 Reinhold Kainhofer 2007-01-26 15:35:27 UTC
SVN commit 627419 by kainhofe:

Work around Windows-isms. RFC 2445 clearly says that all linebreaks are always \r\n, even under Unix, where \n is used for text files. Just because windows apparently adds the \r automatically, when you add a \n, does not mean that other platforms will do the same. Here in Linux, the file contains exactly what you put into the char*, which is a \n only and thus invalid.

CCMAIL: libical@softwarestudio.org
BUG: 140650


 M  +256 -256  data/Compat/KOrganizer_3.1.ics.ical.ref  
 M  +42 -42    data/Compat/KOrganizer_3.1a.ics.ical.ref  
 M  +83 -83    data/Compat/KOrganizer_3.2.ics.ical.ref  
 M  +27 -27    data/Compat/MSExchange.ics.ical.ref  
 M  +74 -74    data/Compat/Mozilla_1.0.ics.ical.ref  
 M  +20 -20    data/vCalendar/KOrganizer_vCalTestCase01.vcs.ical.ref  
 M  +20 -20    data/vCalendar/KOrganizer_vCalTestCase02.vcs.ical.ref  
 M  +20 -20    data/vCalendar/KOrganizer_vCalTestCase03.vcs.ical.ref  
 M  +21 -21    data/vCalendar/KOrganizer_vCalTestCase04.vcs.ical.ref  
 M  +21 -21    data/vCalendar/KOrganizer_vCalTestCase05.vcs.ical.ref  
 M  +19 -19    data/vCalendar/KOrganizer_vCalTestCase06.vcs.ical.ref  
 M  +20 -20    data/vCalendar/KOrganizer_vCalTestCase07.vcs.ical.ref  
 M  +20 -20    data/vCalendar/KOrganizer_vCalTestCase08.vcs.ical.ref  
 M  +20 -20    data/vCalendar/KOrganizer_vCalTestCase09.vcs.ical.ref  
 M  +20 -20    data/vCalendar/KOrganizer_vCalTestCase10.vcs.ical.ref  
 M  +21 -21    data/vCalendar/KOrganizer_vCalTestCase11.vcs.ical.ref  
 M  +20 -20    data/vCalendar/KOrganizer_vCalTestCase12.vcs.ical.ref  
 M  +21 -21    data/vCalendar/KOrganizer_vCalTestCase13.vcs.ical.ref  
 M  +4 -4      runtestcase.pl