Closed Bug 338824 Opened 20 years ago Closed 20 years ago

Can't import unfortunately folded utf8 encoded icalendar files

Categories

(Calendar :: Internal Components, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 315672

People

(Reporter: bugzilla, Assigned: gray)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060326 Firefox/1.5.0.3 (Debian-1.5.dfsg+1.5.0.3-2) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060507 Mozilla Sunbird/0.3a2 I'm trying to transition from another calendar (jpilot to be specific) to Sunbird, but Sunbird can't import the icalendar files I've exported for it. The reason seems to be that Sunbird tries to interpret the utf8 description before it's unfolded it (as per rfc 2445, section 4.1) and the utf8 interpreter gets half of multibyte characters which are not legal utf8. Reproducible: Always Steps to Reproduce: 1. start Sunbird 2. go to File->Import 3. Select test-calendar.ics (I'll attatch this file to the bug) 4. Selcet "Open" Actual Results: I get a dialog box containing: Unable to read from file:/home/qha/test-calendar.ics [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIConverterInputStream.readString]" nsresult "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: file:///usr/local/sunbird/components/calIcsImportExport.js :: ics_importFromStream :: line 77" data: no] Expected Results: I should have gotten a new event on April 3 2006.
This is the file referenced in step 3 of how to reproduce.
Reading rfc 2445 very carefully it seems that my example file is not just unfortunately folded but actually erroneously folded since the rfc says "That is, a long line can be split between any two characters by inserting a CRLF immediately followed by a single linear white space character (i.e., SPACE, US-ASCII decimal 32 or HTAB, US-ASCII decimal 9)", thus, splitting in the middle of a character is not allowed. However, I still think Sunbird should be able to import these files.
So either this bug is invalid because your calendar file is malformed or this is a duplicate of Bug 315672 per your last comment.
Ok, duplicate of 315672 seems about right. I wouldn't agree with invalid, as Sunbird obviously doesn't follow the rfc either "When parsing a content line, folded lines MUST first be unfolded according to the unfolding procedure described above" (rfc 2445, section 4.1 again). *** This bug has been marked as a duplicate of 315672 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
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.

Attachment

General

Creator:
Created:
Updated:
Size: