From: Chris R. <chr...@me...> - 2002-05-29 08:05:43
|
CZa...@wi... wrote: > > I cannot use Base64, the data is written via Net::LDAP::LDIF...... See > Below. (Since you are using Net::LDAP::LDIF, you have the MIME::Base64 module installed, so you *are* in fact able to use it.) The LDIF module is REQUIRED to encode values in Base64 under certain conditions. One of those is if the value contains "unsafe" characters, eg non-ASCII or non-UTF-8 characters (I forget which, but in this case it doesn't matter.) The following snippet will decode your value: use MIME::Base64; my $p = <<EOS UmVwbGFjZTpvcmNsbGFzdGFwcGxpZWRjaGFuZ2VudW1iZXJeMTJeMjAwMjA1MjMxNzIw MjZ6Xmp3cy1wb3J0YWxkCm9yY2xsYXN0YXBwbGllZGNoYW5nZW51bWJlcjoyMjAKAA== EOS ; my $x = decode_base64($p); print "Decoded to $x\n"; Your value contains embedded newlines, which are NOT SAFE. Using the debugger reveals this: DB<1> x $x 0 "Replace:orcllastappliedchangenumber^12^20020523172026z^jws-portald\cJorcll astappliedchangenumber:220\cJ\c@" You haven't included all the output from your script, so it isn't possible to say if the problem's in your script or in your server. You may want to read the documentation that came with your server describing the syntax of the 'orcllastappliedchangenumber' attribute. Cheers, Chris |