rpc_rgy_get_codesets- obtains supported code sets information from the local host
void rpc_rgy_get_codesets( rpc_codeset_mgmt_p_t *code_sets_array, error_status_t *status);
- An array that specifies the code sets supported by the caller's host environment. Each array element is an integer value that uniquely identifies one code set.
- Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.
Possible status codes and their meanings include:
The routine was unable to allocate memory to encode the value.
Cannot open the code set registry file.
Cannot read the code set registry file.
The rpc_rgy_get_codesets() routine examines the locale environment of the host on which the calling process is running to determine both the local code set currently in use by the process and the set of supported code sets into which the process can convert data, if necessary. It then reads the code sets registry on the local host to retrieve the unique identifiers associated with these supported code sets. Both client and server processes can make use of the routine; it is used for character and code set interoperability, which permits clients and servers to transfer international character data in a heterogeneous character set and code sets environment.
The code sets array returned by the rpc_rgy_get_codesets() routine contains, along with values corresponding to the calling process's local code set and the code sets into which it can convert data, the maximum number of bytes that each code set uses to encode one character (the c_max_bytes variable).
A server application uses the rpc_rgy_get_codesets() routine in its initialization code to get its host's supported character and code sets values; it can then export them into the name service database with the rpc_ns_mgmt_set_attribute() routine.
A client application uses the rpc_rgy_get_codesets() routine during the server binding selection process to retrieve the character and code sets supported by its host; it can then evaluate them against the character and code sets that a particular server supports. Because the code set evaluation routines rpc_cs_eval_with_universal() and rpc_cs_eval_without_universal() call the rpc_rgy_get_codesets() routine on the client's behalf, client applications that call these routines do not need to explicitly call rpc_rgy_get_codesets(). Further character and code set evaluation implementations may need to make use of the rpc_rgy_get_codesets() routine.
Please note that the html version of this specification may contain formatting aberrations. The definitive version is available as an electronic publication on CD-ROM from The Open Group.