Re: Newbie ldaplib questions

Paul Panotzki (
Wed, 25 Sep 1996 14:56:46 +0200

At 09.31 96-09-25, Jochen Keutel wrote:
>>1, binary data
>If the attribute values are binary in nature, and thus not suitable
>to be returned as an array of char *'s, the ldap_get_values_len()
>routine can be used instead. It takes the same parameters as
>ldap_get_values() , but returns a NULL-terminated array of pointers
>to berval structures, each containing the length of and a pointer
>to a value.

OK, but how do I know if it's binary data or not? Do I have to check the
attribute name, and from that deduce what type of data it is?

Couldn't the attribute "photo" be either of mac pict, jpeg, gif or
whatever. Or is it always jpeg?

>> 2, charsets
>A LDAP string is defined as an octet string - so you are able to store
>arbitrary octets in a (single) LDAP server.
>If you are using LDAP to access a X.500 server: X.500 stores directory strings
>as either Printable or T.61 (X.500 (88)). When you retrieve an attribute
>(for example, surname) from the server via LDAP you'll get it as an
>octet string - coded as T.61. You can switch on translation into
>ISO8859-x (latin1, ...) with either:
>- setting appropriate definitions in ldap-3.3/Make-common when compiling
> the LDAP source

Hmmm, same thing here. How would I know it's T.61 or Printable, and how
would I know it's a Polish value (Latin 2) or a Swedish value (Latin 1) so
that I can use the appropriate translator?

>Hope this helps.
> Jochen.

Yes it did help. Thank you very much!


Paul Panotzki <> Tel: +46707536497
Royal Institute of Technology
Stockholm, Sweden