Just found a bug in the way iCal4j parses Outlook 2007 iCal messages (bug seems to be in MS BTW).

Not sure whether this code is in 4.5, I'm working on the 3.1.4 source.

Zimbra does this in cs.mailbox.calendar.ZCalendar::ZCalendarBuilder::b uild:

...
CalendarParser parser = new CalendarParserImpl();
...

try {
parser.parse(new UnfoldingReader(reader), handler);

The problem with Outlook 2007 is that it breaks long text lines with this pattern "\r\n\t" and UnfoldingReader in iCal4J up to release 0.9.20 doesn't handle it. Patching UnfoldingReader with this pattern:

/**
* The pattern used to identify a fold in Mozilla Calendar/Sunbird and KOrganizer.
*/
private static final char[] RELAXED_FOLD_PATTERN_1 = { '\n', ' ' };

/**
* The pattern used to identify a fold in Microsoft Outlook 2007.
*/
private static final char[] RELAXED_FOLD_PATTERN_2 = { '\r', '\n', '\t' };



Fixes the problem. Interestingly enough Outlook 2003 just didn't bother breaking up the lines at all ....

Regards,
Chris