Closed Bug 254356 Opened 21 years ago Closed 21 years ago

incorrect line endings

Categories

(Calendar :: Internal Components, defect)

x86
Linux
defect
Not set
normal

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:
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
Hmmm. Right. I'll post to the libical mailing list and see what they say.
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
Note: also requires patch in bug 259956 to prevent \r\r\n line ends.
QA Contact: gurganbl → libical
Component: libical → Internal Components
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.