+ "Clean up RECORD to make it suitable for EUDC.
+Make the record a cons-cell instead of a list if it is
+single-valued. Change the `$' character in postal addresses to a
+newline. Combine separate mail fields into one mail field with
+multiple addresses."
+ (let ((clean-up-addresses (or (not (boundp 'ldap-ignore-attribute-codings))
+ (not ldap-ignore-attribute-codings)))
+ result mail-addresses)
+ (dolist (field record)
+ ;; Some servers return case-sensitive names (e.g. givenName
+ ;; instead of givenname); downcase the field's name so that it
+ ;; can be matched against
+ ;; eudc-ldap-attributes-translation-alist.
+ (let ((name (intern (downcase (car field))))