Skip Menu |

This queue is for tickets about the Data-ICal CPAN distribution.

Report information
The Basics
Id: 25730
Status: resolved
Priority: 0/
Queue: Data-ICal

People
Owner: Nobody in particular
Requestors: jpierce [...] cpan.org
MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.13
Fixed in: (no value)



Subject: support for writing out spec-compliant CRLF line endings is missing
The iCalendar spec prescribes that line endings should always be CRLF. In practice, some iCalendar tools chose to use native line breaks instead (Evolution and KOrganizer on Linux just use "\n"). Data::iCal should be able to deal with CRLF line breaks gracefully: - If a file is read in with CRLF, as_string() should produce it. - It should be an option to as_string() to select the EOL character: as_string( eol => "\r\n") As a "use case", I want to inject a new event into an existing calendar. It may have CRLF line breaks. So, I need text generated by Data::ICal to have CRLF line breaks as well. Mark Reference: http://www.ietf.org/rfc/rfc2445.txt (just search for "CRLF")
Subject: ::Property::_fold does not follow RFC
The RFC says to fold with CRLF, not LF. This can compound problems with some parsers. Below is a patch (against .13) to correct this. It also uses a tab instead of a space so that folded lines are more human readable, as well as trying to not break words. -- /usr/lib/perl5/site_perl/5.8.5/Data/ICal/Property.pm~ 2007-01-12 13:21:32.000000000 -0500 +++ /usr/lib/perl5/site_perl/5.8.5/Data/ICal/Property.pm 2009-04-08 20:56:49.000000000 -0400 @@ -316,7 +316,7 @@ # } } else { while ( $string =~ /(.{76})/ ) { - $string =~ s/(.{75})(.)/$1\n $2/; + $string =~ s/(.{64,74}\b)|(.{74})/$1\r\n\t/; } }
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #44886] ::Property::_fold does not follow RFC
Date: Wed, 22 Apr 2009 12:04:26 +0900
To: Jerrad Pierce via RT <bug-Data-ICal [...] rt.cpan.org>
From: Jesse Vincent <jesse [...] fsck.com>
This patch makes tests fail and causes additional warnings from the test suite. Could you take another shot, possibly with test updates? On Wed 8.Apr'09 at 21:30:49 -0400, Jerrad Pierce via RT wrote: Show quoted text
> Wed Apr 08 21:30:48 2009: Request 44886 was acted upon. > Transaction: Ticket created by JPIERCE > Queue: Data-ICal > Subject: ::Property::_fold does not follow RFC > Broken in: 0.13, 0.15 > Severity: Important > Owner: Nobody > Requestors: jpierce@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44886 > > > > The RFC says to fold with CRLF, not LF. > This can compound problems with some parsers. > > Below is a patch (against .13) to correct this. It also > uses a tab instead of a space so that folded lines are > more human readable, as well as trying to not break words. > > -- /usr/lib/perl5/site_perl/5.8.5/Data/ICal/Property.pm~ > 2007-01-12 13:21:32.000000000 -0500 > +++ /usr/lib/perl5/site_perl/5.8.5/Data/ICal/Property.pm > 2009-04-08 20:56:49.000000000 -0400 > @@ -316,7 +316,7 @@ > # } > } else { > while ( $string =~ /(.{76})/ ) { > - $string =~ s/(.{75})(.)/$1\n $2/; > + $string =~ s/(.{64,74}\b)|(.{74})/$1\r\n\t/; > } > } >
Download (untitled)
application/pgp-signature 194b

Message body not shown because it is not plain text.