[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldap_err2string format



According to <draft-ietf-ldapext-ldap-c-api-04.txt>, the output of ldap_err2string(err) is:
  "an informative zero-terminated character string message describing the error."

It doesn't specify whether the string is encoded in UTF-8 or may be local, such as DBCS.

The draft says:
  All DN and string attribute values passed into or produced by this C LDAP API are represented using the character set of the underlying LDAP protocol version in use.  When this API is used with LDAPv3, DN and string values are represented as UTF-8[6] characters.

But this is neither a DN or string attribute value.  I've heard arguments both ways.  
So what do you think?  Does the spec nail this down to UTF-8 (in LDAPv3)?

If so, the common coding practice of:
   printf(".... %s\n", ldap_err2string(err));
is ill advised since it's not internationalized.