You do not need to call encode_base64 on the value before passing it
to the server.
Graham.
On Tue, Jan 15, 2002 at 05:41:54PM +0100, Felix Aertz wrote:
> Hi
>
> my problem is: I will add a String into LDAP with perl-ldap.
> The string contains non-ascii codes.
>
> My first step is to encode the string from latin1 to utf8 than
> to base64. Next, I tried to add the encoded string. Ther is the
> problem. The string should end up as binary data in LDAP
> example: sn: Weiß -> sn:: V2Vpw58=
>
> At next I tried this way:
>
> $enc_text="Weiß";
> $log_username="XMan" ;
> $ldap_base="ou=staff, dc=hs-bremen, dc=de";
> $u=Unicode::String::latin1($enc_text);
> $Result = $ldap->modify("uid=$log_username,$ldap_base",
> replace => { 'sn' => encode_base64($u->utf8) } );
>
> It dosn't work, too!!!
> The output is "sn: V2Vpw58=" not "sn:: V2Vpw58="
>
> What can I do that?
>
>
> Thanks for help.
> Felix Aertz
>
>
>
|