kewisch / ical.js

Javascript parser for ics (rfc5545) and vcard (rfc6350) data
https://kewisch.github.io/ical.js/
Mozilla Public License 2.0
1.01k stars 138 forks source link

Support VCard 2.1 #187

Open derwaldgeist opened 9 years ago

derwaldgeist commented 9 years ago

If I try to parse a vCard in 2.1 format, the parser does not accept it, since the "TYPE=" tags are missing. Is vCard 2.1 not supported?

kewisch commented 9 years ago

Vcard2 is currently not supported. version 3.0 was recently contributed, so it might be easy to add support for 2.1

skjnldsv commented 6 years ago

Hello! Any news on this? :)

kewisch commented 6 years ago

Unfortunately I won't have time in the near future to work on this, but contributions are welcome!

caugner commented 5 years ago

The vCard 3.0 RFC lists the following Differences From vCard v2.1:

  1. The QUOTED-PRINTABLE inline encoding has been eliminated. Only the "B" encoding of [RFC 2047] is an allowed value for the ENCODING parameter.
  2. The method for specifying CRLF character sequences in text type values has been changed. The CRLF character sequence in a text type value is specified with the backslash character sequence "\n" or "\N".
  3. Any COMMA or SEMICOLON in a text type value must be backslash escaped.
  4. VERSION value corresponding to this specification MUST be "3.0".
  5. The [MIME-DIR] predefined types of SOURCE, NAME and PROFILE are allowed.
  6. The [MIME-DIR] VALUE type parameter for value data typing is allowed. In addition, there are extensions made to these type values for additional value types used in this specification. 7.The [VCARD] CHARSET type parameter has been eliminated. Character set can only be specified on the CHARSET parameter on the Content-Type MIME header field.
  7. The [VCARD] support for non-significant WSP character has been eliminated.
  8. The "TYPE=" prefix to parameter values is required. In [VCARD] this was optional.
  9. LOGO, PHOTO and SOUND multimedia formats MUST be either IANA registered types or non-standard types.
  10. Inline binary content must be "B" encoded and folded. A blank line after the encoded binary content is no longer required.
  11. TEL values can be identified as personal communication services telephone numbers with the PCS type parameter value.
  12. The CATEGORIES, CLASS, NICKNAME, PRODID and SORT-STRING types have been added.
  13. The VERSION, N and FN types MUST be specified in a vCard. This identifies the version of the specification that the object was formatted to. It also assures that every vCard will include both a structured and formatted name that can be used to identify the object.

Update: This translates to the following requirements (sections refer to the vCard 2.1 Specification):

schlagmichdoch commented 2 years ago

Are you still working on this @caugner ? Would love to have the categories tag included!

qertis commented 1 month ago

+1 needs categories