Encoding newlines in iCal files

后端 未结 7 1835
别那么骄傲
别那么骄傲 2020-12-14 05:41

I\'m trying to figure out how to encode newlines in the DESCRIPTION part of an iCal file in such a way that they will import properly into Outlook, Google Calendar and the A

7条回答
  •  无人及你
    2020-12-14 06:25

    Your output file should be like below---

    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//2013//#Ur Site Name#//EN
    BEGIN:VEVENT
    UID:[event]2012
    DTSTART:20130101T100000
    DTEND:20130101T120000
    LOCATION:
    SUMMARY:#Meeting Title here#
    DESCRIPTION:What is realistic for financial services companies to achieve via Social Media channels?    \n\nJoin us on 11th September 2013 at 4pm (BST) where we 
    -----bla bla bla ----
    END:VEVENT
    END:VCALENDAR
    

    Here you have to take care of Version, it should be 2.0 and Escape char ... \n(newline), semicolon(;) and comma(,). If you are writing in .net then it should like ... "\\n", "\\;" and "\\,".

    You can check your output file on this site as well... https://icalendar.org/validator.html

    Thanks, Bhaskar

提交回复
热议问题