Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-22-2007, 10:47 PM
Senior Member
 
Posts: 54
Default Outlook 2007 iCal format

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
Reply With Quote
  #2 (permalink)  
Old 03-23-2007, 01:17 PM
Zimbra Employee
 
Posts: 57
Default

Hi, Chris. Thanks for the suggestion. Your fix is basically correct, but we need to also deal with LF-tab. So there are total 4 cases: CRLF-space, LF-space, CRLF-tab, and LF-tab.

See comment #6 in bug 15506.

http://bugzilla.zimbra.com/show_bug.cgi?id=15506
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.