#### Establishing the Server's Supported Code Sets

The next step in writing an internationalized RPC server is to add to the server's initialization code a call to the DCE RPC routine rpc_rgy_get_codesets( ). This routine gets the supported code set names defined in the locale environment and translates those names to their unique identifiers by accessing the code set registry on the host. The server initialization code should call this routine after it has registered the interface and created a server entry for its binding information in the name service database (by calling the DCE RPC NSI binding export routine rpc_ns_binding_export( )).

The routine returns an array of unique identifiers from the code set registry that correspond to the server's local code set and the code sets into which the server can convert, if necessary; this data structure is called the code sets array. The code sets array also contains, for each code set, the maximum number of bytes that code set uses to encode one character.

The purpose of this step is to obtain the registered unique identifiers for the server's supported code sets for use by the DCE character and code set interoperability features, rather than using the string names for the code sets. The DCE features for character and code set interoperability do not use string names because different operating systems commonly use different string names to refer to the same code set, and clients and servers passing international characters in a cell of heterogeneous platforms need to ensure that they both refer to the same code set when establishing compatibility.

The code set registry provides the means for clients and servers to uniquely identify a code set while permitting different platforms and the code set converters offered on those platforms to continue to use the string names for the code sets.

See the rpc_rgy_get_codesets(3rpc) reference pages in the OSF DCE Application Development Reference for a description of the rpc_rgy_get_codesets( ) routine's signature and arguments.

####