From: Felix A. <ae...@rz...> - 2002-01-15 15:53:37
|
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=DF -> sn:: V2Vpw58=3D At next I tried this way: $enc_text=3D"Wei=DF"; $log_username=3D"XMan" ; $ldap_base=3D"ou=3Dstaff, dc=3Dhs-bremen, dc=3Dde"; $u=3DUnicode::String::latin1($enc_text); $Result =3D $ldap->modify("uid=3D$log_username,$ldap_base", replace =3D> { 'sn' =3D> encode_base64($u->utf8) } ); It dosn't work, too!!! The output is "sn: V2Vpw58=3D" not "sn:: V2Vpw58=3D" What can I do that? Thanks for help. Felix Aertz |