#include <ldap.h> int ldap_set_locale( char *locale )
The ldap_set_locale() API is used to change the locale used by LDAP for conversions between the local code page and UTF-8 or Unicode. Unless explicitly set with the ldap_set_locale() API, LDAP will use the application's default locale. To force the LDAP library to use another locale, specify the appropriate locale string.
Note that the specified locale is applicable to all conversions by the LDAP library within the applications address space. The LDAP locale should be set or changed only when there is no other LDAP activity occuring within the application on other threads.
*R authority is needed to the selected locale file and *X to the associated directories.
You can set the value of locale to C, "", LC_C or the IFS pathname of a *LOCALE object. A locale value of C indicates the default C environment. A locale value of "" tells ldap_set_locale() to use the default locale for the implementation.
Examples:
rc = ldap_set_locale(LC_C); rc = ldap_set_locale("/qsys.lib/en_us.locale");
The ldap_set_locale() API will return LDAP error code if not successful. See LDAP Client API Error Conditions for possible values for LDAP error codes.
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_set_locale API. |
Top | LDAP APIs | APIs by category |