hi,  I am trying to use perl's Net::LDAP module to manipulate data in
eDirectory 8.6.2.  We are located in Scandinavia and have many attributes
that include utf8 characters.

use utf8;
use Net::LDAP;
use Net::LDAP::LDIF;
use Unicode::String qw(latin1 utf8);

The following ldap search works fine, and prints output in the desired
latin1 charset:

                 $mesg = $ldap->search ( base => "o=org",
                           filter => "(&(objectclass=user)(cn=$cn))"
                            );
                  foreach $entry ($mesg->all_entries) {
                                      print
utf8($entry->get_value(sn))->latin1, "\n";


However, I have problems doing LDAP modifies using similar data.

                  $sname="some name in latin1 charset";
                  $result = $ldap->modify ($user->dn,
                         replace => { sn => latin1($sname)->utf8 }
                        );

This ldap modify succeeds for an ordinary name like "Smith", but for a name
with extended characters like "S�rensen", the call never returns.  It seems
like the LDAP server blocks for some reason.

I can do the similar utf8/latin1 encoding with Net::LDAP::LDIF methods and
build valid LDIF entries that load fine into eDirectory.   The LDIF methods
automatically base-64 encode the utf8 data.

Does anyone have any idea why the LDAP server would not return?

Thanks,
Phillip


Reply via email to