Closing this because this seems to be a Thunderbird-related problem and not a DAVdroid issue. If you think this is a DAVdroid-related issue, please post again here and I’ll re-open.
Country field
-
Hi all,
I’m using DAVdroid to sync Posteo-Server and Samsung Galaxy Note 3 neo (Android 4.4.2).
When fetching a contact from the server DAVdroid changes the letters in country field to all upper cases, i.e. Italien becomes ITALIEN.
Why? -
@Herbert vcard4android prints the country in upper letters because I have read in local addressing guidelines that for international addressing (= when a country is required), the country should be in upper case.
-
Thanks for your reply.
Please leave it to the user’s choice! I expect DAVdroid to sync the data, not to change it!
-
DAVdroid doesn’t change anything. To clarify: DAVdroid doesn’t change the country part of the structured address, but it generates a formatted address with an upper-case country if there is no formatted address.
Android requires a formatted address to display. If your server doesn’t send an
ADR LABEL
(formatted address), the only choice is whether DAVdroid generates the formatted address, or whether Android does (in which case the formatted address looks very strange).If you want DAVdroid to use a specific formatted address, just send it as an
ADR LABEL
. -
@rfc2822 said in Country field:
… it generates a formatted address with an upper-case country if there is no formatted address.
OK.
I see no need to generate it with upper-cases, please leave it to user’s choice.
-
@Herbert The need is that international addressing (= what postal addresses with countries are used for) requires the country in upper case.
May I ask why the upper case country in the formatted address is a problem for you? The country in the structured address will stay as it was sent.
What do you mean with “user’s choice”? An option for lower/upper case countries or an option for not generating formatted addresses at all (in this case, Android will generate one)? The problem with that is that we don’t want to clutter DAVdroid with rather unimportant options.
In my opinion, the best option would be to not use the formatted address at all, but the seperated components whenever possible. Unfortunately, many Contacts apps use the formatted address for displaying, while many CardDAV servers only send/process the (unstructured) formatted address.
-
@rfc2822 said in Country field:
@Herbert The need is that international addressing (= what postal addresses with countries are used for) requires the country in upper case.
I think this is rather unofficial.
@rfc2822 said in Country field:
May I ask why the upper case country in the formatted address is a problem for you?
I have created my addresses in mixed case. Country in upper cases does not fit, it looks ugly, I don’t want it.
@rfc2822 said in Country field:
What do you mean with “user’s choice”?
If someone wants the country in upper cases he may create addresses like that. Others - like me - create the country in mixed case or maybe in lower cases. DAVdroid should generate it the way the user has created it.
@rfc2822 said in Country field:
An option for lower/upper case countries or an option for not generating formatted addresses at all (in this case, Android will generate one)? The problem with that is that we don’t want to clutter DAVdroid with rather unimportant options.
I agree.
-
@Herbert said in Country field:
@Herbert The need is that international addressing (= what postal addresses with countries are used for) requires the country in upper case.
I think this is rather unofficial.
It’s at least the case for:
- Germany (Post AG): “[Zielland] in Großbuchstaben ausgeschrieben, keine Länderkürzel”
- Austria: “Bei Auslandssendungen Bestimmungsort und Bestimmungsland immer in Großbuchstaben”
- all examples on the Royal Mail homepage
- and many others, but I couldn’t find it as a general rule, and there seem to be some exceptions.
The question is of course, whether DAVdroid should do such processing.
What has to be considered:
- It’s questionable whether DAVdroid should prepare for “international addressing” or whether Android’s
formattedAddress
is rather a “display address”. Maybe DAVdroid shouldn’t even try to fillformattedAddress
and let Android do that. - The
formattedAddress
is exported asADR LABEL
, which is clearly a “delivery address”. Maybe theformattedAddress
shouldn’t be exported asADR LABEL
, because there are (little) semantic differences? Until now, I have considered Android’sformattedAddress
andADR LABEL
as the same thing. The problem goes even further: Android speaks about “structured addresses”, whereas VCard 4 is about “delivery addresses”. - If DAVdroid does not prepare the
formattedAddress
, which may be exported as anADR LABEL
, people might say that DAVdroid generates invalid “delivery addresses” (which it already does in many cases, because every country has specific addressing guidelines; but at least the country would be correct).
The best solution would of course be a user-configurable template engine + GUI for country-specific delivery addresses, including the ability to transform between Android “formatted addresses” and VCard “delivery addresses”
If someone wants the country in upper cases he may create addresses like that. Others - like me - create the country in mixed case or maybe in lower cases. DAVdroid should generate it the way the user has created it.
If the user creates an
ADR LABEL
, DAVdroid won’t change it.