[Vobject] vcard 3.0 parsing error

Jeffrey Harris jeffrey at osafoundation.org
Tue Dec 2 18:36:23 CST 2008


Hi Jon,

> I've been using vobject for a few months and have just run into an issue.
> 
> I exported a contact from Google Gmail, and CRLF was represented as
> "=0D=OA=".
> 
> Neither vobject-0.6.6 nor vobject-0.7.1 handled it.

Try passing allowQP=True to the parser.  Doing this uses a (massively)
slower state machine parser, but it notices lines that are
quoted-printable encoded and should parse them appropriately.  It's too
bad there's so much vCard 2.1 data out there, you pretty much have to
tolerate old style vCards, I'm afraid.

The reason this isn't the default is that if you're parsing a 50k
iCalendar file, you really don't want to use the state machine parser.
If you're just parsing a few vcards, performance should be fine.  I need
to document this better, sorry.

Sincerely,
Jeffrey


More information about the VObject mailing list