By the way, “restrict background data” is now a per-app setting in Android (Settings / Data usage / DAVdroid / Restrict background data).
Addresses containing a comma not syncing properly
I’m using DAVdroid 0.5.4 on an emulated Android stock phone. (I can test on my actual phone but it takes longer). Some of my contacts have addresses that contain commas, and this is leading to problems.
I sometimes store lat/long information in the street address section of the address field. One could object and say this is misusing the field, but there are other cases where we naturally want to have commas in the street address line of an address, especially for South Korean and possibly Japanese addresses.
Here is a screenshot of the Android contacts list. It’s a public business and therefore no privacy concerns exist.
The actual work address, as seen on the server (OwnCloud 6.0.0a) and via export, is this.
Here’s the relevant line from the VCF I get from OwnCloud.
Is this an OwnCloud bug? Is it a DAVdroid bug? Sorry if I have opened it in the wrong project!
According to RFC 2426 (VCard 3.0) Section 2.4.2 every comma has to be escaped (in contrast to VCard 4!):
In addition, any COMMA character (ASCII decimal 44), SEMI-COLON character (ASCII decimal 59) and COLON character (ASCII decimal 58) MUST be escaped with the BACKSLASH character (ASCII decimal 92)
Could you please see if the VERSION is 3.0 and then change the line in the VCard manually to:
and check whether it works?
Thanks for the quick answer! This is a bug in OwnCloud, it seems. Not an issue with DAVdroid.
The VCard is indeed 3.0.
In the above example, the address type is
ADR;UNKNOWN=X-GPS. In OwnCloud, if I change that address to one of the default options (
ADR;TYPE=WORK) and then take a look at the VCard, it has an escaped comma like it is supposed to. After that, everything on the DAVdroid end works correctly.
I will mention this to the OwnCloud people. Thanks again for your help! Wonderful.