ldap_xlate_local_to_utf8()-- Convert String From the Local Code Page to UTF-8 Encoding
Syntax
#include <ldap.h> int ldap_xlate_local_to_utf8( char *inbufp, unsigned long *inlenp, char *outbufp, unsigned long *outlenp )
Default Public Authority: *USE
Library Name/Service Program: QSYS/QGLDCLNT
Threadsafe: Yes
The ldap_xlate_local_to_utf8() API is used to convert a string from the local code page to a UTF-8 encoding (which is used by LDAP when communicating with an LDAP V3 compliant server).
Authorities and Locks
No IBM® i authority is required.
Parameters
- inbufp
- (Input) A pointer to the address of the input buffer containing the data to be translated.
- inlenp
- (Input) Length in bytes of the inbufp buffer. This value is decremented when the conversion is done, such that on return it indicates the length of inlenp buffer that is left to be translated.
- outbufp
- (Output) A pointer to the address of the output buffer for translated data.
- outlenp
- (Output) Length in bytes of the outbufp buffer. This value is
decremented when the conversion is done, such that on return it indicates the
length of outlenp buffer space left available for translatd data.
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.
Return Value
- LDAP_SUCCESS
- if the request was successful.
- another LDAP error code
- if the request was not successful.
Error Conditions
The ldap_xlate_local_to_utf8() will return an LDAP error code if not successful. See LDAP Client API Error Conditions for possible LDAP error code values.
Error Messages
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_xlate_local_to_utf8 API. |
Related Information
- ldap_xlate_utf8_to_local() -- Convert string from UTF-8 to local code page.
- ldap_xlate_local_to_unicode() -- Convert string from the local to UCS-2 code page.
- ldap_xlate_unicode_to_local() -- Convert string from UCS-2 to local code page.
- ldap_get_iconv_local_codepage() -- Get the active LDAP code page.
- ldap_set_iconv_local_codepage() -- Set the active LDAP code page.
- ldap_set_iconv_local_charset() -- Set the active LDAP character set.
- ldap_set_locale() -- Change the locale used by LDAP.
- ldap_get_locale() -- Get the locale used by LDAP.
API introduced: V4R5
[ Back to top | LDAP APIs | APIs by category ]