#include <ldap.h> int ldap_xlate_utf8_to_local( char *inbufp, unsigned long *inlenp, char *outbufp, unsigned long *outlenp )
The ldap_xlate_utf8_to_local() API is used to convert a UTF-8 encoded string to the local code page encoding.
It is important to note that translation of strings from a UTF-8 encoding to local code page may result in loss of data when one or more characters in the UTF-8 encoding cannot be represented in the local code page. When this occurs, a substitution character replaces any UTF-8 characters that cannot be converted to the local code page.
No IBM® i authority is required.
Note that in general, the output buffer should be three times as large as the input buffer if the intent is to translate the entire input buffer in a single call.
The ldap_xlate_utf8_to_local() will return an LDAP error code if not successful. See LDAP Client API Error Conditions for possible LDAP error code values.
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_xlate_utf8_to_local API. |
[ Back to top | LDAP APIs | APIs by category ]