On 29/5/03 5:15 pm, Neo - <[EMAIL PROTECTED]> wrote: > This is follow-up of my pervious question ...when i try to add values say > > CN=" test"; (Having a white space character in front) > > or name =" "; (null value) > > i expected the values as cn= test; > but when i read the cn attribute in directroy server its giving me in non > readable format like VGVzdCwgT3RoZXIgVGVsICA= > > Any body came across this issue. > > Any advise will greatly help me. > > Thanks in advance .
First, check the FAQ (perldoc Net::LDAP::FAQ) for information about attributes and values and syntaxes etc. In LDAPv3, most 'string' syntaxes use UTF-8, which is a way of encoding Unicode characters. Net::LDAP's interface to your program puts values into scalar variables. If you check the value of your cn attribute by using $entry->get_value("cn"), is it that unreadable string of characters? If you're outputting the information to LDIF, you need to know that the LDIF format treats some characters specially. If the LDIF code needs to print out a value containing "special" characters, it encodes the entire value using Base64 (perldoc MIME::Base64). Having a space at the start of the value is "special" for LDIF. The string of characters you quoted looks like Base64 to me... Cheers, Chris