Skip Headers
Oracle® Call Interface Programmer's Guide,
11g Release 2 (11.2)

Part Number E10646-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

OCI Locale-Mapping Function

This section contains an OCI locale-mapping function.

Table 22-4 OCI Locale-Mapping Function

Function/Page Purpose

OCINlsNameMap()

Maps Oracle character set names, language names, and territory names to and from Internet Assigned Numbers Authority (IANA) and International Organization for Standardization (ISO) names.



OCINlsNameMap()

Purpose

Maps Oracle character set names, language names, and territory names to and from Internet Assigned Numbers Authority (IANA) and International Organization for Standardization (ISO) names.

Syntax

sword OCINlsNameMap ( void             *hndl, 
                      OraText          *buf, 
                      size_t           buflen, 
                      const OraText    *srcbuf, 
                      uword            flag );

Parameters

hndl (IN/OUT)

OCI environment or session handle. If the handle is invalid, then the function returns OCI_INVALID_HANDLE.

buf (OUT)

Points to the destination buffer. If the function returns OCI_SUCCESS, then the parameter contains a NULL-terminated string for the requested name.

buflen (IN)

The size of the destination buffer. The recommended size is OCI_NLS_MAXBUFSZ to guarantee storage of a globalization support name. If the size of the destination buffer is smaller than the length of the name, then the function returns OCI_ERROR.

srcbuf (IN)

Pointer to a NULL-terminated globalization support name. If it is not a valid name, then the function returns OCI_ERROR.

flag (IN)

It specifies the direction of the name mapping and can take the following values:


OCI_NLS_CS_IANA_TO_ORA: Map character set name from IANA to Oracle
OCI_NLS_CS_ORA_TO_IANA: Map character set name from Oracle to IANA
OCI_NLS_LANG_ISO_TO_ORA: Map language name from ISO to Oracle
OCI_NLS_LANG_ORA_TO_ISO: Map language name from Oracle to ISO
OCI_NLS_LOCALE_A2_ISO_TO_ORA: Map locale name from A2 ISO to Oracle
OCI_NLS_LOCALE_ORA_TO_A2_ISO: Map locale name from Oracle to A2 ISO
OCI_NLS_TERR_ISO_TO_ORA: Map territory name from ISO to Oracle
OCI_NLS_TERR_ORA_TO_ISO: Map territory name from Oracle to ISO
OCI_NLS_TERR_ISO3_TO_ORA: Map territory name from 3-letter ISO abbreviation to Oracle

OCI_NLS_TERR_ORA_TO_ISO3: Map territory name from Oracle to 3-letter ISO abbreviation

Returns

OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR.