How to handle comma and newline escaping propely
I may have comma in my Event Summary. For eg. I can have a summary like * "I , am , coming, tomo"* On receving side, I get back is * "I \, am \, coming\, tomo"* What need to be do to get * "I , am , coming, tomo" *on readers client.
Hi Gaurav, --On April 11, 2016 at 11:52:42 AM -0700 Gaurav Jain <monkeyfdude@gmail.com> wrote:
I may have comma in my Event Summary.
For eg. I can have a summary like
* "I , am , coming, tomo"*
On receving side, I get back is
* "I \, am \, coming\, tomo"*
What need to be do to get
* "I , am , coming, tomo" *on readers client.
iCalendar data uses backslash encoding of certain characters as defined in the specification: <https://tools.ietf.org/html/rfc5545#section-3.3.11>. You should use a proper iCalendar library to generate and parse any iCalendar data - the library will take care of doing the proper backslash encode/decode for you. If you send data to the server that does not have the right syntax, the server may reject it or attempt to fix it (e.g. by adding back slashes) depending on how severe the issue is. Thus you should always use a proper iCalendar library when interacting with the server. -- Cyrus Daboo
Hi Cyrus, Thank you for the response. I use https://github.com/libical/XbICalendar which in turn used libical for iOS. Do you think that is fine? On Mon, Apr 11, 2016 at 12:03 PM, Cyrus Daboo <cdaboo@apple.com> wrote:
Hi Gaurav,
--On April 11, 2016 at 11:52:42 AM -0700 Gaurav Jain < monkeyfdude@gmail.com> wrote:
I may have comma in my Event Summary.
For eg. I can have a summary like
* "I , am , coming, tomo"*
On receving side, I get back is
* "I \, am \, coming\, tomo"*
What need to be do to get
* "I , am , coming, tomo" *on readers client.
iCalendar data uses backslash encoding of certain characters as defined in the specification: <https://tools.ietf.org/html/rfc5545#section-3.3.11>.
You should use a proper iCalendar library to generate and parse any iCalendar data - the library will take care of doing the proper backslash encode/decode for you.
If you send data to the server that does not have the right syntax, the server may reject it or attempt to fix it (e.g. by adding back slashes) depending on how severe the issue is. Thus you should always use a proper iCalendar library when interacting with the server.
-- Cyrus Daboo
Hi Gaurav, --On April 11, 2016 at 12:07:07 PM -0700 Gaurav Jain <monkeyfdude@gmail.com> wrote:
I use https://github.com/libical/XbICalendar which in turn used libical for iOS.
Do you think that is fine?
libical itself ought to be OK, but I am not sure how the XbICalendar wrapper is using it. You should probably direct this question to the maintainers of the XbICalendar project. -- Cyrus Daboo
Thanks! On Mon, Apr 11, 2016 at 12:17 PM, Cyrus Daboo <cdaboo@apple.com> wrote:
Hi Gaurav,
--On April 11, 2016 at 12:07:07 PM -0700 Gaurav Jain < monkeyfdude@gmail.com> wrote:
I use https://github.com/libical/XbICalendar which in turn used libical
for iOS.
Do you think that is fine?
libical itself ought to be OK, but I am not sure how the XbICalendar wrapper is using it. You should probably direct this question to the maintainers of the XbICalendar project.
-- Cyrus Daboo
participants (2)
-
Cyrus Daboo
-
Gaurav Jain