[Vobject] v2.1 & TYPE [Was: vCard 2.1 behaviour]

Adam Tauno Williams awilliam at whitemice.org
Fri Nov 2 20:08:06 CDT 2012


On Tue, 2012-10-30 at 06:04 -0400, Adam Tauno Williams wrote:
> On Tue, 2012-10-30 at 09:27 +0100, martin f krafft wrote:
> > also sprach Jeffrey Harris <jeffrey at skyhouseconsulting.com> [2012.10.30.0500 +0100]:
> > > The fact that the encoding (including the line wrapping!) is
> > > different means that a 2.1 parser is a significant chunk of work.
> > > The behaviors were designed with varying syntax/serialization such
> > > as 2.1 v.s 3.0 in mind, but behaviors haven't historically
> > > controlled the content-line layer, which meant we never finished
> > > making 2.1 usable. All in all, there would need to be sizable
> > > changes to support this.
> > You seem to remember this better than what I have been able to find
> > out. Would you be able to take some more time and sketch out the
> > things that need to be done? I don't have endless time either and
> > this sort of information would mean I could spend less time on
> > trying to figure out what to do and more on actually doing it.
> From <http://www.rfc-editor.org/rfc/rfc2426.txt>
> H The "TYPE=" prefix to parameter values is required. In
>   [VCARD] this was optional.
> 
>     * 2.1: TEL;WORK;VOICE:(111) 555-1212
>     * 3.0: TEL;TYPE=WORK,VOICE:(111) 555-1212
> 
>   This is a difference that currently really hurts me.

Should vObject attempt to 'abstract' this difference?  Currently with a
v2.1 card the types are found in the singletonparams value of the line
and in v>2.1 they are in the params value.  The application has to check
the version of the card to know how to handle types... but is there a
sane way to abstract it or is leaving that up to the application OK?
Either way it seems a bit hinky.

Currently my [application] code sets a flag if the card is v2.1 and
looks for the type using the method indicated by the code.

> K TEL values can be identified as personal communication
>   services telephone numbers with the PCS type parameter value.

I've never, ever, seen a PCS type parameter in the wild?  Anyone else?



More information about the VObject mailing list