Skip to content
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

Strange behaviour for VCARD ADR items #150

Open
ukleinek opened this issue Sep 18, 2019 · 0 comments
Open

Strange behaviour for VCARD ADR items #150

ukleinek opened this issue Sep 18, 2019 · 0 comments

Comments

@ukleinek
Copy link

ukleinek commented Sep 18, 2019

I'm not sure if I do something wrong, vobject is just designed for US addresses(?) or there is really an issue.

>>> import vobject
>>> s = """BEGIN:VCARD
... VERSION:3.0
... FN:John Doe
... N:Doe;John
... ADR;TYPE=home:Beispielstraße 42, 12345 Musterstadt
... END:VCARD
... """
>>> v = vobject.readOne(s)
>>> v.adr
<ADR{'TYPE': ['home']}Beispielstraße 42
 12345 Musterstadt
,  >
>>> str(v.adr.value)
'Beispielstraße 42\n 12345 Musterstadt\n,  '

The address is how an address in Germany looks like. When looking at the last line I wonder where the comma and two spaces at the end of v.adr come from. Would be great to learn if the problem is on my side or this is indeed a problem in vobject. It might also be nice to strip the subcomponents to get rid of the space before 12345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant