Peter Marschall wrote: > To stay compatible it normally behaves as the older versions of Net::LDAP. > But when giving the option raw followed by a regular expression to the > constructor it treats all attributes not matching this regular expression as > UTF-8 and converts them accordingly. > Since UTF8 = ASCII in the range 0 - 127 it does not hurt to not include > attributes with only numeric or ASCII values into the regex. > Here's an example: > my $ldap = Net::LDAP->new('myhost.my..domain, > raw => qr/;binary|jpegPhoto/io); > This would keep all attributes whose names contain ";binary" (e.g. > certificates) and "jpegPhoto" as-is whie upgrading all other attributes' > values to UTF-8 perl strings.
Hmm... I see. But since RFC 2252 explicitly specifies that syntax 1.3.6.1.4.1.1466.115.121.1.15 is an UTF-8 string it would be very usefull to have an option which no matter what the attribute is named would set the UTF-8 flag on all "Directory string" attributes. This way you could avoid defining a lot of regex's if you just used your LDAP-server correct. Peter