Closed
Bug 254356
Opened 21 years ago
Closed 21 years ago
incorrect line endings
Categories
(Calendar :: Internal Components, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugzilla, Assigned: gray)
References
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1
Build Identifier: Sunbird nightly http://ftp.mozilla.org/pub/mozilla.org/calendar/sunbird/nightly/2004-07-01/MozillaSunbird-i686-pc-linux-gnu.tar.gz
lines in the iCalendar file are terminated with just a LF; this violates RFC
2445 which requires CRLF throughout, and prevents import of the file into some
other applications, in particular the current version of phpicalendar,
http://phpicalendar.net/forums/
Reproducible: Always
Steps to Reproduce:
Reporter | ||
Updated•21 years ago
|
Blocks: cal-standards
Comment 1•21 years ago
|
||
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Clicking the bonsai link in comment #1, near the patch there is
icalmemory_append_string(&buf, &buf_ptr, &buf_size, "BEGIN:VCALENDAR\n");
...
icalmemory_append_string(&buf, &buf_ptr, &buf_size, "END:VCALENDAR\n");
Do these need to be changed to
icalmemory_append_string(&buf, &buf_ptr, &buf_size, "BEGIN:VCALENDAR");
icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
...
icalmemory_append_string(&buf, &buf_ptr, &buf_size, "END:VCALENDAR");
icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
Also this looks suspicious:
/* WIN32 automatically adds the \r, Anybody else need it?
#ifdef ICAL_UNIX_NEWLINE
*/
char newline[] = "\n";
/*
#else
char newline[] = "\r\n";
#endif
*/
at:
http://lxr.mozilla.org/mozilla/source/other-licenses/libical/src/libical/icalcomponent.c#276
Comment 3•21 years ago
|
||
Hmmm. Right. I'll post to the libical mailing list and see what they say.
Comment 4•21 years ago
|
||
John: You made that change:
http://cvs.sourceforge.net/viewcvs.py/freeassociation/libical/src/libical/icalcomponent.c?r1=1.20&r2=1.21
It doesn't make sense to me how windows will add \r automatically. Maybe the
editor you were using to view the ical file did that? Can you confirm?
I'll post to libical anyway
Comment 5•21 years ago
|
||
libical accepted the patch so I applied it too:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=mozilla%2Fother-licenses%2Flibical&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2004-09-10+06%3A38&maxdate=2004-09-10+06%3A38&cvsroot=%2Fcvsroot
Note: also requires patch in bug 259956 to prevent \r\r\n line ends.
Updated•19 years ago
|
QA Contact: gurganbl → libical
Updated•19 years ago
|
Component: libical → Internal Components
Comment 7•19 years ago
|
||
The bugspam monkeys have been set free and are feeding on Calendar :: Internal Components. Be afraid for your sanity!
QA Contact: libical → base
You need to log in
before you can comment on or make changes to this bug.
Description
•