No graham i am not using LDIF module .
Just reading the values from ldapsearch command i knew excatly which entry has that
particular leading space problem .
here is the sample snap shot
D:\>ldapsearch -h hostname -p port -w -b "filter"
objectClass: top
objectClass: person
objectClass: organizationalperson
objectClass: inetorgperson
cn:: VGVzdCwgT3RoZXIgVGVsICA=
givenName: Other Tel
sn: Test
Here is the code that does the addition
i am collecting all the attribute name and thier values in %prod_hash
$addresult = $prod_ldap->add (dn => $dn , attr => [%prod_hash]);
$addresult->code && warn "failed to add entry: ", $addresult->code;
hope this clears up ...
Thanks again.
-Neo
Graham Barr <[EMAIL PROTECTED]> wrote:
On Thu, May 29, 2003 at 09:15:23AM -0700, Neo - 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)
If you are using LDIF tou output the entries then any attribute
where the value starts with a space or a : or contains non-ascii
characters will be base64 encoded.
>
> 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=
perl -MMIME::Base64=decode_base64 -le 'print
decode_base64("VGVzdCwgT3RoZXIgVGVsICA=")' | hexdump -C
00000000 54 65 73 74 2c 20 4f 74 68 65 72 20 54 65 6c 20 |Test, Other Tel |
00000010 20 0a | .|
Its odd that Net::LDAP::LDIF would output that in b64, I assume
you are using the LDIF module to output the entry ? Can you post
the code you use to fetch and display the entry
Graham.
---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).