Alexandre Jousset wrote:

      I wrote a small test app like this:
-------------------------------------------------------
#!/usr/bin/perl -w

use strict;
use utf8;
use encoding 'utf8';

use Net::LDAP;

my $ldap = Net::LDAP->new('localhost', version => 3);

unless ($ldap) {
     die "Could not connect to localhost: $@";
}

my ($dn, $passwd) = ('cn=admin,dc=exemple,dc=com', 'mypass');

my $mesg = $ldap->bind(dn => $dn, password => $passwd);
if ($mesg->is_error) {
     die "LDAP bind failed: " . $mesg->error;
}

print "schema = " . $ldap->schema;
-------------------------------------------------------

And when used like this, it gets an undef'd schema. If I remove the
"use encoding 'utf8';" line, it works ok.

Do you need something else ? Am I doing something wrong ?


Confirmed.

When I add "use encoding 'utf8';" line into my scripts I get

Net::LDAP encountered an error while decoding a response packet from
the server

and

Bad sequence length  at
/usr/local/lib/perl5/site_perl/5.8.7/Convert/ASN1/Debug.pm line 79,
<DATA> line 424.
...
...
Use of uninitialized value in addition (+) at
/usr/local/lib/perl5/site_perl/5.8.7/Convert/ASN1/Debug.pm line 88,
<DATA> line 424.
Use of uninitialized value in printf at
/usr/local/lib/perl5/site_perl/5.8.7/Convert/ASN1/Debug.pm line 94,
<DATA> line 424.
...

in the debug(15) output.

FreeBSD 5.4-RELEASE-p4, perl 5.8.7, Convert::ASN1 0.18, perl-ldap 0.33.

Any ideas?

--
Eugene Gladchenko,
EVG15-RIPE


Reply via email to