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
Doesn't handle non-standard multi-line values output by Google #108
Comments
Also, just a quick note about another error parsing Google's file: |
TEL;:+1-202-867-5309 v = vobject.vCard()
...
v.add('tel').value = "+1-202-867-5309"
v.tel.type_param = ["CELL", "WORK"]
If one phone, then everything is OK! ...
v.add('tel').value = "+1-202-000-0000"
v.tel.type_param = ["CELL", "HOME"]
|
@YuraKursk Hi, thanks for your reply! |
Write the code itself. The module vobject is raw. |
@NickSto, here's the option: s = 'TEL;:+1-202-867-5309'
i = s.find(':')
if i > 0:
tag = s[:i]
data = s[i+1:]
j = tag.find(';')
if j > 0:
typ = tag[j+1:]
tag = tag[:j]
if len(typ):
typ = ';' + typ
s = tag + typ + ':' + data
print(s) TEL:+1-202-867-5309 |
@YuraKursk I see, you're suggesting a way to edit the string before giving it to |
This is technically an issue Google Contacts, not
vobject
, but it's a compatibility issue that I thought the maintainers might be interested in knowing.I exported my Google Contacts from the Android app into a
.vcf
file. This file contains several fields where the value extends to multiple lines, but they aren't indented properly. This causesvobject
's parser to choke.It does include many properly-indented values (usually base64-encoded
PHOTO;ENCODING=BASE64;JPEG
) where the additional lines are indented with a space character.But there are many values where it's not indented. The ones I've seen are all
QUOTED-PRINTABLE
-encoded strings.Is this a known issue? I didn't see anything on an initial search.
The text was updated successfully, but these errors were encountered: