[Date Prev][Date Next] [Chronological] [Thread] [Top]

cannot add entries with Umlaut characters


I am having trouble to add the following contents to a OpenLdap 2.1.9 server, apparently due to Umlaut characters in the ldif file:
This is the output of ldapadd

adding new entry "cn=Susanne Boesch,dc=interprisma,dc=ch"
ldapadd: update failed: cn=Susanne Boesch,dc=interprisma,dc=ch
ldap_add: Invalid syntax (21)
        additional info: cn: value #0 invalid per syntax

ldif file:

dn: cn=Susanne Boesch,dc=interprisma,dc=ch
cn:: U3VzYW5uZSBC9nNjaA==
sn:: QvZzY2g=
givenName:: U3VzYW5uZQ==
mail:: c3VzYW5uZS5ib2VzY2hAZ3JhbmVsbGEtaG9sZGluZy5jaA==
telephoneNumber:: MDU2IDI5NyAzMyAwOA==
facsimileTelephoneNumber:: MDU2IDI5NyAzMyA1OA==
objectClass: inetOrgPerson

I am generating these entries automatically and convert all fields to base-64 just in case they contain non-ascii characters

the non-encoded entry would look like:

dn: cn=Susanne Bösch,dc=granella-holding,dc=ch
cn: Susanne Bösch
sn: Bösch
givenName: Susanne
mail: susanne.boesch@granella-holding.ch
telephoneNumber: xxxxxxxxxxxxxx
facsimileTelephoneNumber: xxxxxxxxxxxx
objectClass: inetOrgPerson

So the dn: value is converted using a cn value without Umlaut characters. All the other entries are converted to base-64 using code like this


use MIME::Base64;

$encoded = encode_base64("String_to_encode");


Making the cn and sn values 'harmless' ASCII character strings makes the error go away, but does of course not solve the problem

Thanks for pointers


Püntenstrasse 39
8143 Stallikon
PGP Fingerprint: BC9A 25BC 3954 3BC8 C024 8D8A B7D4 FF9D 05B8 0A16