2004-10-18 Marcus Mueller <znek@mulle-kybernetik.com>
+ * v4.3.8
+
+ * VSSaxDriver.m: added support in _parseString: for Unix style
+ terminated content lines. Such content lines clearly violate the
+ RFC but such ical files happen to appear in the wildlife.
+
+ * README: updated
+
+ * v4.3.7
+
* Version: removed major and minor. This effectively bumps the version
- to v4.3.7 which is in sync with the rest of sope-ical (v4.3.7)
+ to v4.3.7 which is in sync with the rest of sope-ical.
2004-10-17 Helge Hess <helge.hess@opengroupware.org>
abandoned and hardly maintainable libical, which itself is an additional
dependency to the OGo project and thus a welcome candidate for replacement.
+The VSSaxDriver attempts to follow RFC2445 closely, however the parser is
+written to be robust when it comes to parsing real life content. Currently,
+unescaping is done for more characters then it MUST according to RFC2445, but
+this is probably not a bad idea - wrongly escaped characters will still be
+parsed according to the original intent. Also, the VSSaxDriver supports Unix
+style terminated lines/folding.
ToDo
====
-- REWRITE _parseLine:! It doesn't properly deal with escaped characters
- as it SHOULD, thus properly corrupting content
- improve error handling (SaxExceptions !)
- make the driver fully xCal compliant
}
}
}
+ else if(c == '\n') { /* broken, non-standard */
+ BOOL isAtEndOfLine = YES;
+ /* test for folding first */
+ if(((length - 1) - pos) >= 1) {
+ unichar ws = [_rawString characterAtIndex:pos + 1];
+ isAtEndOfLine = [whitespaceCharSet characterIsMember:ws] ? NO
+ : YES;
+ if(!isAtEndOfLine) {
+ /* assemble part of line up to pos */
+ if(r.length > 0) {
+ [line appendString:[_rawString substringWithRange:r]];
+ }
+ /* unfold */
+ pos += 1;
+ r = NSMakeRange(pos + 1, 0); /* begin new range */
+ }
+ }
+ if(isAtEndOfLine) {
+ /* assemble part of line up to pos */
+ if(r.length > 0) {
+ [line appendString:[_rawString substringWithRange:r]];
+ }
+ [self _parseLine:line];
+ /* reset line */
+ [line deleteCharactersInRange:NSMakeRange(0, [line length])];
+ r = NSMakeRange(pos + 1, 0); /* begin new range */
+ }
+ }
else {
r.length += 1;
}