-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Adds support for vCard 2.1 #389
Conversation
Awesome!! @caugner |
Glad to see you are working on it, life saver! I tried testing it, but am getting "unsupported vCard version" with a vCard 4.0. Taking a brief look at the code, it look like your switch statement only handles 3.0 and 2.1 (though it could be intentional in that specific spot). |
@tasn Can you share the vCard 4.0 which triggered the error? It sounds as if the vCard combines properties of vCard 3 and 4, because this switch statement should only be evaluated for vCards other than 4.0: |
@@ -228,6 +231,8 @@ ICAL.parse = (function() { | |||
); | |||
} | |||
|
|||
var debug = line.includes("37.386013"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var debug = line.includes("37.386013"); |
Apologies for the noise! I guess you can ignore my comment. The entry for reference:
|
regarding [1] there are two old issues at nextcloud contacts & server with some example ENCODING=QUOTED-PRINTABLE characters of danish and german users in case you want to extend your test case vcard21.vcf |
I guess this was accidentally closed because of the deletion of |
Fixes #187.
QUOTED-PRINTABLE
inline encoding [cf. Section 2.1.2].CRLF
(but instead literally as "\", followed by "n" or "N").COMMA
as a multi-value separator [all values are single values].SEMICOLON
must also be backslash escaped in vCard 2.1. "in a component of a compound property" [cf. Section 2.1.3]VERSION
to be "2.1" [cf. Section 2.6.6].CHARSET
type parameter [and default toASCII
, cf. 2.1.6].TYPE=
andENCODING=
, cf. 2.1.2].TYPE
ofLOGO
[cf. 2.5.3.1],PHOTO
[cf. 2.2.3.1] andSOUND
[cf. 2.6.3.1] as defined by the spec [e.g.GIF
].ENCODING
parameter [and default to7-bit
, cf. 2.1.5].PCS
type parameter value forTEL
[from vCard 3.0].CATEGORIES
,CLASS
,NICKNAME
,PRODID
andSORT-STRING
[from vCard 3.0].N
andFN
[Note:N
is only required for writers, not for readers, cf. 2.2.2].VERSION
is also required in vCard 2.1 [cf. [4] and 2.6.6].COMMA
to separateGEO
values [cf. 2.4.6 versusSEMICOLON
in vCard 3.0]