Hi, On Thursday 30 October 2003 19:50, [EMAIL PROTECTED] wrote: > I'm trying to insert an attribute encoding using base64. But I don't > know how to tell Net::LDAP that my attribute is in base64. > > Loading from an LDIF is really easy because you use '::' instead ':' > for an attrib. > > example: > > dn: mydn > name:: RulsaXg= > > But how can I do that using Net::LDAP??
Short answer: you don't. Base64 encoding is only necessary for LDIF files. I think it was invented to be able to keep 8bit data in LDIF files on 7bit (=not 8bit clean) systems. With Net::LDAP you do not need to encode data to base64 before adding them to the directory. Simply use the un-base64-encoded value. (in your example: "Félix") Please note: for attributes that are not explicitely of binary syntax (e.g. name) LDAP expects data to be UTF8 encoded. Your example is not UTF8 encoded but simple ISO8859-1. (the UTF8 encoding of "Félix" would look like "Félix") For en-/decoding between 8bit character set and the unicode encodeing UTF8 there are various modules on CPAN. Peter -- Peter Marschall eMail: [EMAIL PROTECTED]