Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#161 Error unfolding multiline ics rfc2445 4.1

Release
open
Ben Fortuna
Parsing (53)
5
2013-05-09
2013-05-09
No

Sorry if here is already an error open for this, did the search and found at least two similiar/related, but not this one (assuming it is an error)

According to rfc2445, lines exceeding 75 octets (without counting bla bla bla), must be "folded" with crlf followed with a white space. The parser is working fine when a white space is used (ASCII 32), but seems to be failing when using an horizontal tab (ASCII 09). According to the RFC, an htab is as valid as a white space.

I attached a created sample ics file for convenience

Heres it content

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 14.0 MIMEDIR//EN
VERSION:2.0
METHOD:REPLY
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VTIMEZONE
TZID:W. Europe Standard Time
BEGIN:STANDARD
DTSTART:16011028T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010325T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;PARTSTAT=ACCEPTED:mailto:locoxella@gmail.com
CLASS:PUBLIC
COMMENT:Hola!\nLe mando el meeting para una junta para empezar a trabajar n
birdie yo quiero ser\, me confirman pls\nSaludos!\n
CREATED:20130508T202156Z
DTEND;TZID="W. Europe Standard Time":20130515T173000
DTSTAMP:20130508T202156Z
DTSTART;TZID="W. Europe Standard Time":20130515T160000
LAST-MODIFIED:20130508T202156Z
LOCATION:OFICINAS DF POLANCO
PRIORITY:5
SEQUENCE:1
SUMMARY;LANGUAGE=es-mx:Aceptada: RV: PLATAFORMA ENGAGEMENT NUTELLA
TRANSP:OPAQUE
UID:040000008200E00074C5B7101A82E008000000000068F13B1648CE01000000000000000
010000000E451B5BFCC8217489F64C8AB02E27191
X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//E
N">\n<HTML>\n<HEAD>\n<META NAME="Generator" CONTENT="MS Exchange Server ve
rsion 08.01.0240.003">\n<TITLE></TITLE>\n</HEAD>\n<BODY>\n<!-- Converted f
rom text/rtf format -->\n\n<P DIR=LTR><SPAN LANG="es-mx"></SPAN><SPAN LANG
="es-mx"></SPAN><SPAN LANG="es-mx"><FONT COLOR="#000000" FACE="Century Got
hic">Hola!</FONT></SPAN></P>\n\n<P DIR=LTR><SPAN LANG="es-mx"><FONT COLOR=
"#000000" FACE="Century Gothic">Le mando el meeting para una junta para em
pezar a trabajar nbirdie yo quiero ser\, me confirman pls</FONT></SPAN></P
>\n\n<P DIR=LTR><SPAN LANG="es-mx"><FONT COLOR="#000000" FACE="Century Got
hic">Saludos!</FONT></SPAN><SPAN LANG="es-mx"></SPAN><SPAN LANG="es-mx"></
SPAN><SPAN LANG="es-mx"></SPAN></P>\n\n</BODY>\n</HTML>
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:1
X-MS-OLK-AUTOFILLLOCATION:FALSE
X-MS-OLK-CONFTYPE:0
END:VEVENT
END:VCALENDAR

Works just fine if you change it to:

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 14.0 MIMEDIR//EN
VERSION:2.0
METHOD:REPLY
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VTIMEZONE
TZID:W. Europe Standard Time
BEGIN:STANDARD
DTSTART:16011028T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010325T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;PARTSTAT=ACCEPTED:mailto:locoxella@gmail.com
CLASS:PUBLIC
COMMENT:Hola!\nLe mando el meeting para una junta para empezar a trabajar n
birdie yo quiero ser\, me confirman pls\nSaludos!\n
CREATED:20130508T202156Z
DTEND;TZID="W. Europe Standard Time":20130515T173000
DTSTAMP:20130508T202156Z
DTSTART;TZID="W. Europe Standard Time":20130515T160000
LAST-MODIFIED:20130508T202156Z
LOCATION:OFICINAS DF POLANCO
PRIORITY:5
SEQUENCE:1
SUMMARY;LANGUAGE=es-mx:Aceptada: RV: PLATAFORMA ENGAGEMENT NUTELLA
TRANSP:OPAQUE
UID:040000008200E00074C5B7101A82E008000000000068F13B1648CE01000000000000000
010000000E451B5BFCC8217489F64C8AB02E27191
X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//E
N">\n<HTML>\n<HEAD>\n<META NAME="Generator" CONTENT="MS Exchange Server ve
rsion 08.01.0240.003">\n<TITLE></TITLE>\n</HEAD>\n<BODY>\n<!-- Converted f
rom text/rtf format -->\n\n<P DIR=LTR><SPAN LANG="es-mx"></SPAN><SPAN LANG
="es-mx"></SPAN><SPAN LANG="es-mx"><FONT COLOR="#000000" FACE="Century Got
hic">Hola!</FONT></SPAN></P>\n\n<P DIR=LTR><SPAN LANG="es-mx"><FONT COLOR=
"#000000" FACE="Century Gothic">Le mando el meeting para una junta para em
pezar a trabajar nbirdie yo quiero ser\, me confirman pls</FONT></SPAN></P
>\n\n<P DIR=LTR><SPAN LANG="es-mx"><FONT COLOR="#000000" FACE="Century Got
hic">Saludos!</FONT></SPAN><SPAN LANG="es-mx"></SPAN><SPAN LANG="es-mx"></
SPAN><SPAN LANG="es-mx"></SPAN></P>\n\n</BODY>\n</HTML>
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:1
X-MS-OLK-AUTOFILLLOCATION:FALSE
X-MS-OLK-CONFTYPE:0
END:VEVENT
END:VCALENDAR

Im assuming the problem is with the parser, did not checked the source code. Saw an example of source code for parsing at the time of do the unfolding, but I don't know if that was the actual code for the project. In that sample, an ASCII 32 was taken into account for folded lines, while ASCII 09 not.

Thanks for your time.

Discussion

  • ICS sample file with folded line (CRLF followed by ASCII 9)

     
    Attachments
  • Ben Fortuna
    Ben Fortuna
    2013-05-11

    Hi Andrés,

    We do currently support both space and htab as folding delimiters, not sure why it isn't working for you. I just copied the sample into a test and it seems to unfold ok for me. I would suggest maybe you attach a file to this issue exactly as it is when it doesn't unfold properly.

    regards,
    ben