OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
The remainder of this chapter describes the DCE RPC features for character and code set
interoperability in remote procedure calls that are available to programmers who are
developing internationalized DCE RPC applications. The first section describes the
concepts of character sets, code sets and code set conversion and explains the default
character and code set conversion mechanism that the RPC runtime protocol supports for
remote procedure calls. The remaining sections describe the execution of a remote
procedure call when it uses the DCE RPC features for character and code set
interoperability, and explains how to build an RPC application that uses these features.
15.1 Character Sets, Code Sets, and Code Set Conversion
A character set is a group of characters, such as the English alphabet, Japanese Kanji,
and the European character set. To enable world-wide connectivity, DCE guarantees
that a minimum group of characters is supported in DCE. The DCE RPC
communications protocol ensures this guarantee by requiring that all DCE RPC clients
and servers support the DCE Portable Character Set (PCS). The Introduction to OSF
DCE lists the characters in the DCE PCS. The IDL base type specifiers char and
idl_char identify DCE PCS characters.
A code set is a mapping of the members of a character set to specific numeric code
values. Examples of code sets include ASCII, JIS X0208 (Japenese Kanji), and ISO
8859-1 (Latin 1). The same character set can be encoded in different code sets;
consequently, DCE can contain RPC clients and servers that use the same character set
but represent that character set in different numeric encodings. Code set conversion is
the ability for a DCE RPC client or server to convert character data between different
code sets.
The DCE RPC communications protocol, through the NDR transfer syntax, provides
automatic code set conversion for DCE PCS characters encoded in two code sets: ASCII
and EBCDIC. The RPC communications protocol automatically converts character data
declared as char or idl_char between ASCII and EBCDIC encodings, as necessary, for
all DCE RPC clients and servers.
The DCE RPC communications protocol does not provide support for the recognition of
characters outside of the DCE PCS, nor does it provide automatic conversion for
characters encoded in code sets other than ASCII and EBCDIC.
However, DCE RPC does provide IDL constructs and RPC runtime routines that
programmers can use to write RPC applications that exchange nonPCS, or
‘‘international,’’ character data that is encoded in code sets other than ASCII and
EBCDIC. These features provide mechanisms for international character and code set
evaluation and automatic code set conversion between RPC clients and servers. Using
these features, programmers can design their applications to run in a DCE that supports
multiple heterogeneous character sets and code sets.
The next section describes the remote procedure call execution model when the DCE
RPC features for character and code set interoperability are used.
15 2 Tandem Computers Incorporated 124245