ldap_set_iconv_local_codepage()-- Set the Active LDAP Code Page




Syntax

#include <ldap.h>
 
int
ldap_set_iconv_local_codepage (char * codepage)



Threadsafe: Yes

The ldap_set_iconv_local_codepage() API is used to set a global variable ldap_global_codepage to a value passed by codepage or to a value associated with a locale if codepage is NULL. For example, this function can be used to set the ldap_global_codepage to Unicode, thus enabling conversion between UTF-8 and UCS-2 using the ldap_xlate_local_to_utf8() and ldap_xlate_utf8_to_local() APIs.

NOTE that the word local in the API refers to the value of the global variable ldap_global_codepage if it is set or a codepage value associated with the current locale.

Authorities and Locks

No OS/400 authority is required. All authority checking is done by the LDAP server.

Parameters

codepage
(input) specifies local code page value.

Return Value

LDAP_SUCCESS
if the request was successful.
Other LDAP error code
if the request was not successful.

Error Conditions

If ldap_set_iconv_local_codepage() will return LDAP error code if not successful. See ldap_error_condt() for possible values for LDAP error codes.

Error Messages

    The following message may be set from this function.
    CPF3CF2 E  Error(s) occurred during running of ldap_set_iconv_local_codepage API.

Related Information

    ldap_xlate_local_to_utf8() -- Convert String From the Local to UTF-8 Code Page. 
    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_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. 


Top | LDAP APIs List
APIs by category

[Information Center Home Page | Feedback ] [Legal | AS/400 Glossary]