[Vobject] difference between handling of 2.1 and 3.0

Jonathan Kaczynski jmkacz at gmail.com
Thu Jan 8 14:25:48 CST 2009


I noticed something odd. I have the following code:

data = """BEGIN:VCARD
VERSION:3.0
FN:John Smith
N:Smith;John;;;
END:VCARD"""

vcards = vobject.readComponents( data, allowQP=True )
v = vcards.next()
print type(v.n.value)
print v.n.value

The output I see is:

<class 'vobject.vcard.Name'>
 John  Smith

Which is what I expect. However, if I change the version to 2.1, I see:

<type 'unicode'>
Smith;John;;;

Why is the return value for the "N" component different between 2.1 and 3.0?
I am currently using version 0.6.6 of vobject.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.skyhouseconsulting.com/pipermail/vobject/attachments/20090108/f5b8494a/attachment.htm 


More information about the VObject mailing list