From teemu.nikkila at innovativeideasoy.com Tue Oct 17 20:56:45 2006 From: teemu.nikkila at innovativeideasoy.com (Teemu =?iso-8859-1?q?Nikkil=E4?=) Date: Tue, 17 Oct 2006 21:56:45 +0300 Subject: [icalendar-dev] Help with recurrence rules Message-ID: <200610172156.46208.teemu.nikkila@innovativeideasoy.com> Hi, I'm a new icalendar module user and I have a question about solving recurrence rules. I need to find out if an event occurs on a given date and this is quite difficult to do if the event is a recurring one. I'd like to know if somebody has more information about handling the rules - maybe some documentation or pointers to (Python) programs doing this. Cheers, Teemu From andrewb at cse.unsw.edu.au Tue Oct 17 23:41:30 2006 From: andrewb at cse.unsw.edu.au (Andrew Baumann) Date: Wed, 18 Oct 2006 07:41:30 +1000 Subject: [icalendar-dev] Help with recurrence rules In-Reply-To: <200610172156.46208.teemu.nikkila@innovativeideasoy.com> References: <200610172156.46208.teemu.nikkila@innovativeideasoy.com> Message-ID: <200610180741.30606.andrewb@cse.unsw.edu.au> On Wednesday 18 October 2006 04:56, Teemu Nikkil? wrote: > I'm a new icalendar module user and I have a question about solving > recurrence rules. I need to find out if an event occurs on a given date and > this is quite difficult to do if the event is a recurring one. I'd like to > know if somebody has more information about handling the rules - maybe some > documentation or pointers to (Python) programs doing this. Have a look at this module: http://labix.org/python-dateutil Andrew From ykardia at gmail.com Thu Oct 19 12:49:03 2006 From: ykardia at gmail.com (Brad) Date: Thu, 19 Oct 2006 12:49:03 +0200 Subject: [icalendar-dev] Possible bug: Linebreaks mess up unicode? Message-ID: <80127d8a0610190349o4a25dd62p2ad948f1cdc95041@mail.gmail.com> Hi, just tried loading a python-icalendar-generated ics file in the new Sunbird, and it complained that it wasn't utf-8. I investigated, and found that it looks as if the unicode is possibly messed up by the linebreaking. The same file shows up fine in Apple iCal and in Novell Evolution, so it is possible that Sunbird is just being too strict. When I run the generated file through iconv like so: iconv -f UTF-8 -t UTF-8 mycal.ics iconv also complains. Here is a script that reproduces the issue (I hope Gmail doesn't mess up the whitespace and linebreaks...): -------------------- import icalendar if __name__ == "__main__": desc1 = u'XXXXX Conference:\n"Gesti\xf3n de riesgos en el sector del petr\xf3leo"' desc2 = u'XXXXXX Conference:\n"Gesti\xf3n de riesgos en el sector del petr\xf3leo"' c = icalendar.Calendar() c.add('prodid', '-//The test Calendar//xxxx.es//') c.add('version', '2.0') e = icalendar.Event() e.add('description', desc1) f = icalendar.Event() f.add('description', desc2) c.add_component(e) c.add_component(f) print 'desc1:' + desc1.encode('utf-8') print 'desc2:' + desc2.encode('utf-8') fh = open('test.ics', 'wb') fh.write(c.as_string()) fh.close() -------------------- If I run this, the first description (desc1) will create an entry for which there is a linebreak just at the second \xf3 (accented o). This seems to mess it up. For desc2, an entry is created that has a line break before the second \xf3, so it is not messed up. (I have tried pasting the output below, but have no idea as to how this will come out). Is this a bug in Sunbird or in icalendar? Can anyone help me? I can replicate this on Mac OS X 10.4.7, python 2.4.3, icalendar 0.11 Fedora Core 5, python 2.4.2, icalendar 0.11 Thanks. A Different Max (not Max M) test.ics: --------------------------------- BEGIN:VCALENDAR PRODID:-//The test Calendar//cemfi.es// VERSION:2.0 BEGIN:VEVENT DESCRIPTION:XXXXX Conference:\n"Gesti?n de riesgos en el sector del petr? ?leo" END:VEVENT BEGIN:VEVENT DESCRIPTION:XXXXXX Conference:\n"Gesti?n de riesgos en el sector del petr ?leo" END:VEVENT END:VCALENDAR From regebro at gmail.com Thu Oct 19 15:29:54 2006 From: regebro at gmail.com (Lennart Regebro) Date: Thu, 19 Oct 2006 15:29:54 +0200 Subject: [icalendar-dev] Possible bug: Linebreaks mess up unicode? In-Reply-To: <80127d8a0610190349o4a25dd62p2ad948f1cdc95041@mail.gmail.com> References: <80127d8a0610190349o4a25dd62p2ad948f1cdc95041@mail.gmail.com> Message-ID: <319e029f0610190629y45eb3981m7441d969dc56f891@mail.gmail.com> On 10/19/06, Brad wrote: > DESCRIPTION:XXXXX Conference:\n"Gesti?n de riesgos en el sector del petr? > ?leo" Right, the line-ending happens inside the UTF-character, breaking it. This is a bug in icalendar. I'm guessing the conversion from unicode to UTF-8 should be done in Contentline.__str__ instead of in vText.ical(), although that might not make much sense either. Hmmm. Maybe the conversion could be done not in vXxx.ical, but in vXxx.__str__ as well as in Contentline.__str__ after the line splitting? -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.nuxeo.org/ From diedrich at tux4web.de Sat Oct 21 22:00:50 2006 From: diedrich at tux4web.de (Diedrich Vorberg) Date: Sat, 21 Oct 2006 22:00:50 +0200 Subject: [icalendar-dev] Folding lines and utf-8 Message-ID: <9568012D-F218-49C6-BDBF-189D18071F73@tux4web.de> Hello list, let me start by saying "Thank You" for the effort you put in icalendar and that you made it available as OSS. I've run into a little problem with line folding. The Contentline.__str__() method splits long lines at the 74th characters. Yet when using multi byte encodings as utf-8 this may split a a single char in two rendering the resulting textfile non- complient with the Unicode standard. One calendering application complained about this and I had to write a workaround that removes the corresponding database field if it happens. This is not a big loss in my case, but I thought I'd bring up the issue on the list. Kind regards Diedrich -- Diedrich Vorberg http://tux4web.de ? Tel: 02302 425269 "Unix is simple, but it takes a genius to understand the simplicity." ? Dennis Ritchie -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/icalendar-dev/attachments/20061021/d86fc4df/attachment.htm From ykardia at gmail.com Mon Oct 23 16:35:00 2006 From: ykardia at gmail.com (Brad) Date: Mon, 23 Oct 2006 16:35:00 +0200 Subject: [icalendar-dev] utf linebreaking bug Message-ID: <80127d8a0610230735v37e2f3c3s2ea15ca2d0ef4277@mail.gmail.com> Hello, Do I have to file the "utf linebreaking bug" somewhere? Is it likely that this will be fixed any time soon? Thanks for your help. Regards, Max (not Max M). From regebro at gmail.com Mon Oct 23 17:14:39 2006 From: regebro at gmail.com (Lennart Regebro) Date: Mon, 23 Oct 2006 17:14:39 +0200 Subject: [icalendar-dev] utf linebreaking bug In-Reply-To: <80127d8a0610230735v37e2f3c3s2ea15ca2d0ef4277@mail.gmail.com> References: <80127d8a0610230735v37e2f3c3s2ea15ca2d0ef4277@mail.gmail.com> Message-ID: <319e029f0610230814w4ba240e9u88bf6ced65461083@mail.gmail.com> On 10/23/06, Brad wrote: > Do I have to file the "utf linebreaking bug" somewhere? I don't think there is a bugtracker. > Is it likely that this will be fixed any time soon? Depends on your definition of "soon". :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.nuxeo.org/ From msmith at fluendo.com Wed Oct 25 12:42:48 2006 From: msmith at fluendo.com (Michael Smith) Date: Wed, 25 Oct 2006 12:42:48 +0200 Subject: [icalendar-dev] A minor bug Message-ID: <1161772968.5648.1.camel@localhost.localdomain> Hi, We're trying to use your icalendar module here - which is working nicely, thanks. We automatically run pychecker over our codebase on every commit, though, and it's picking a bug up in caselessdict.py. Here's a simple patch. Mike -------------- next part -------------- A non-text attachment was scrubbed... Name: popitem.patch Type: text/x-patch Size: 464 bytes Desc: not available Url : http://codespeak.net/pipermail/icalendar-dev/attachments/20061025/75861b40/attachment.bin From maxm at mxm.dk Wed Oct 25 15:32:20 2006 From: maxm at mxm.dk (Max M) Date: Wed, 25 Oct 2006 15:32:20 +0200 Subject: [icalendar-dev] A minor bug In-Reply-To: <1161772968.5648.1.camel@localhost.localdomain> References: <1161772968.5648.1.camel@localhost.localdomain> Message-ID: <453F6764.9000700@mxm.dk> Michael Smith skrev: > Hi, > > We're trying to use your icalendar module here - which is working > nicely, thanks. We automatically run pychecker over our codebase on > every commit, though, and it's picking a bug up in caselessdict.py. > > Here's a simple patch. It's a rarely used method, but yes it seems to be a bug. MaxM From teemu.nikkila at innovativeideasoy.com Sun Oct 29 21:33:33 2006 From: teemu.nikkila at innovativeideasoy.com (Teemu =?iso-8859-1?q?Nikkil=E4?=) Date: Sun, 29 Oct 2006 22:33:33 +0200 Subject: [icalendar-dev] Help with recurrence rules In-Reply-To: <200610180741.30606.andrewb@cse.unsw.edu.au> References: <200610172156.46208.teemu.nikkila@innovativeideasoy.com> <200610180741.30606.andrewb@cse.unsw.edu.au> Message-ID: <200610292233.33552.teemu.nikkila@innovativeideasoy.com> Hello again and sorry for really late answer - and also thanks for suggestions! -Teemu