-
The ics file becomes invalid because the file will be shorted e.g. to 'END:VCALEND', this is because of special characters in the summary text. For each special character a letter will be removed. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi any ideas when this issue can this be looked at. Thanks |
Beta Was this translation helpful? Give feedback.
-
I don't experience this issue, I'm using special characters in calendar title, eg.: new \Eluceo\iCal\Component\Calendar("Exemple avec des èàù accents") and events, eg.: (new \Eluceo\iCal\Component\Event())->setSummary("Résidus verts") If I were you I'd look elsewhere, eg., setting the right headers: header('Content-Type: text/calendar; charset=utf-8'); |
Beta Was this translation helpful? Give feedback.
-
This might be the issue: https://support.google.com/calendar/thread/204991361/google-calendar-not-importing-ics-files-correctly-requires-unnecessary-bom?hl=en. Adding a BOM fixed it for me: private function streamCalendar(Calendar $calendar): void {
$handle = fopen('php://output', 'r+');
$BOM = chr(0xEF) . chr(0xBB) . chr(0xBF);
fwrite($handle, $BOM);
$calendarComponent = (new CalendarFactory)->createCalendar($calendar);
foreach ($calendarComponent as $line) {
fputs($handle, (string) $line);
}
fclose($handle);
} |
Beta Was this translation helpful? Give feedback.
I don't experience this issue, I'm using special characters in calendar title, eg.:
and events, eg.:
If I were you I'd look elsewhere, eg., setting the right headers: