I think value of TEL has to be escaped as well. For example iOS5, when export
contact to VCard3, escapes comma ( , -> \,). I could not find a way to enter ;
: and \ characters via android \ ios devices, however it is possible to have
those when importing contacts from 3rd party source - for example, you can
import contacts from LinkedIn to Android, and have all set of characters
OK so from what I understand you want to import telephone numbers with
characters like ; : \ , . and you want cardme to write out vcard TEL types
with those characters escaped.
I can say that right now cardme does not escape anything for the TEL type and
will allow any text into the phone number. This seems to be something specific
for an OS. According to RFC2426 it does not say anything about escaping values
in tel type, so I can add this escaping as a compatibility mode.
Can you tell me which applications or OS needs to have telephone numbers
We have our own app with versions for many platforms, on one platform
(Android) we use CardMe as VCard parser / serializer.
We wanted to find out shall TEL values be escaped by our own vcard libs on
other platforms and shall we have a workaround for CardMe. Unfortunately I
could not find clear rules on escaping TEL values. I have checked iOS5 vcard
exporter, and it has escaped at least ";" and ",".
So this post now seems more like discussion - do you think CardMe should do
same as iOS5 exporter and escape TEL values? Is there some kind of authority
where this question could be clarified?
There is a clear rule for escaping TEL types, the rule is no escaping.
The rules are located here
I think cardme should escape TEL types only if the iphone compatibility mode
is turned on.
Would this help you ?
Yep, it seems vcard does not mention explicitly escaping of TEL values, which
seems imply that it needn't be escaped.
Because of that, I don't think CardMe should be modified. Besides CardMe we
have our own VCard libs for other platforms, and we can just agree that TEL
values are not escaped. We do not use iOS exporter, I have tried it just to
check what should be escaped in TEL. Now it seems that iOS exporter violates
So I guess issue is resolved now.
Lev, CardMe already has many workarounds for other applications.
You can read about them here https://sourceforge.net/projects/cardme/forums/f
I can easily add escaping TEL types in CardMe as a compatibility mode for
specific applications. I am already doing that for several apps.
I'll add this as a feature in CardMe to escape TEL types only if compatibility
mode is set to IOS_EXPORTER.
Okay, anyway thanks for nice lib!
You're welcome, don't hesitate to post most feature requests. I want cardme to
support a large variety of apps :)
btw, I added the feature to the SVN if you want to check it out. Below is what
would be done to enabled iOS exporter mode.
VCardWriter writer = new VCardWriter();
I will be pushing out a new release of cardme in November to include this and
other bug fixes, features and patches.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.