0

I recently worked on a mobile website that generates calendar events, which when downloaded can be added to the device's native calendar. Out of the box, the ics format works great on outlook, and on iOS. However, Android is a bit trickier. Following the advice from this thread, I served vCalendar (vcs) format to Android devices.

This appears to be working great, aside from one thing - the descriptions. The DESCRIPTION element has text that spans multiple lines, but the line breaks don't appear to be escaping properly (as they do nicely in iOS). Instead when I serve the escaped line breaks, I'm getting them as literals within the DESCRIPTION text on the Android device, which just looks nasty.

To clarify, this is how it looks on iOS:

This is the first sentence.
This is the second sentence.

And on Android:

This is the first sentence.\nThis is the second sentence.

Not escaping the line breaks will of course mean that the DESCRIPTION ends once the first line breaks is encountered. Information on this whole topic is quite scarce, but has anyone got experience with how to deal with the line breaks on Android?

UPDATE I'm experiencing this issue on Samsung Galaxy S (GT-I9000) running Gingerbread (although it was the same on Eclair). Here's a screenshot after escaping \n to be \\n:

Community
  • 1
  • 1
Chris Bell
  • 593
  • 4
  • 10

1 Answers1

0

looks like android is not compliant with rfc5545 which specifies that the summary property has a text value (§3.8.1.12) https://www.rfc-editor.org/rfc/rfc5545#section-3.8.1.12 and text values as defined by (§3.3.11) must escape the new line as \n or \N https://www.rfc-editor.org/rfc/rfc5545#section-3.3.11

Community
  • 1
  • 1
Auberon Vacher
  • 4,655
  • 1
  • 24
  • 36
  • If that is the case, has anyone found a workaround? Surely I'm not the first person to come across this problem, although it is strange I've seen so little information on this topic. – Chris Bell Oct 30 '12 at 19:57