Ho! You are generating the file? I thought you were parsing a file... So
maybe you need .encode('someencoding')I am not sure but I think web2py will return ascii since python default encoding is ascii (http://docs.python.org/2/howto/unicode.html) So something like that : row.variable.encoding('utf-8') should work... ? Richard On Thu, Oct 3, 2013 at 2:48 AM, Annet <[email protected]> wrote: > > Not just this, the text inside of the file should be utf-8 encoded... >> Where this file come from (which software generate it)? >> >> You have to make sure that it is generated correctly (right encoding), in >> thunderbird for instance you can specified it if I remember. In outlook it >> may be impossible, so you will have to convert it mannually. >> > > > Is that what the call to xml() does in generic.ics? > > It's not the contents of the file that's giving me problems, the contents > is ietf compliant, it's the file name that's the cause of the problem. > Here's the contents of the .ics file. > > > {{response.headers['Content-Disposition'] = > 'attachment;filename=event_%s_%s.ics' % (IS_SLUG()(name)[0], > row.startDate.strftime("%d-%m-%Y"))}}BEGIN:VCALENDAR > VERSION:2.0 > CALSCALE:GREGORIAN > BEGIN:VEVENT > {{if row.onlocation:}}LOCATION:{{=row.onlocation}}{{pass}} {{if > row.locality:}}{{=row.locality}}{{pass}} > SUMMARY:{{=row.summary}} > DTSTART;TZID={{=row.TZID}}:{{=row.startDate.strftime("%Y-%m-%d").replace("-","")}}{{if > row.startTime:}}T{{=row.startTime.strftime("%H:%M:%S").replace(":","")}}{{pass}} > DTEND;TZID={{=row.TZID}}:{{if > row.endDate:}}{{=row.endDate.strftime("%Y-%m-%d").replace("-","")}}{{else:}}{{=row.startDate.strftime("%Y-%m-%d").replace("-","")}}{{pass}}{{if > row.endTime:}}T{{=row.endTime.strftime("%H:%M:%S").replace(":","")}}{{else:}}T240000{{pass}} > {{if row.shortdescr:}}DESCRIPTION:{{=row.shortdescr}}{{pass}} > {{if row.url:}}URL;VALUE=URI:{{=row.url}}{{pass}} > END:VEVENT > END:VCALENDAR > > > Kind regards, > > Annet > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

