ICalendar not readable by google calendar.

半腔热情 提交于 2019-11-28 20:58:43

The problem with ical feeds is that different calendars are picky about different things, and the spec is, at least for me, kind of hard to follow. However, Kanzaki does a great job of making the spec clear for programmers like me.

Now, your ical feed also needs to be exact down to the newline break (Apple's ical won't import feeds with the wrong newline at the end) and I've found a combination of these 3 validators to work best:

The most strict validator actually had false positives for me (ie, it reported errors that actually aren't errors according to the spec), but caught some errors the first two didn't, that's why I would recommend running your feed through all three of them.

The Ical format says that each line has a max length of 75 bytes - split lines restart on the next line with single whitespace character inserted at the beginning.

I'm not at all sure but I seem to recall Google calendar expecting this requirement.

Running your feed through this validator - http://icalvalid.cloudapp.net/Default.aspx - will get you a long way there, but it's not 100%. I ran into additional issues with special characters which needed to be escaped.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!