tibrv_SetCodePages()
Function
Declaration
tibrv_statustibrv_SetCodePages(
char* host_codepage,
char* net_codepage);
Purpose
Set code pages for automatic string conversion on EBCDIC platforms (namely, IBM i and z/OS).
String Conversion
Rendezvous software uses the operating system’s iconv() call to automatically convert strings. This automatic conversion applies to strings within message fields, field names, subject names, and other strings associated with messages (even when they are not strictly inside a message). Conversion occurs only as needed:
| • | Programs running in EBCDIC environments represent all strings using an EBCDIC code page (called the host code page). Before inserting strings into a message object, Rendezvous software converts those strings to an ASCII character set (the network code page). |
| • | Conversely, when extracting strings from a message object, Rendezvous software converts those strings to the EBCDIC host code page before presenting the strings to the program. |
Remarks
This call sets the host and network code pages for string conversions in EBCDIC environments. On other operating system platforms, this call has no effect, and returns without error.
Call this function when the system code pages differ from the Rendezvous default code pages (see the table of Default Code Pages). Throughout an enterprise, all sending and receiving programs must use the same code pages.
Both arguments are string names of code pages. To determine valid code page names for your operating system, see documentation from the operating system vendor.
Programs may call this function at most once. The call must precede the first call to tibrv_Open().
|
Parameter |
Description |
|
|
Set this code page as the native (EBCDIC) character encoding for the host computer. |
|
|
Set this code page as the ASCII character set for the network. |
Default Code Pages
To use a default code page, programs may supply NULL for either parameter. Using the default code pages in both parameter positions has the same effect as not calling this function at all.
|
OS Platform |
Default Host Code Page |
Default Network Code Page |
|
IBM i |
This value instructs IBM i routines to use the system-defined default code page. |
|
|
z/OS |
|
|