OSF DCE Application Development Guide--Core Components

Writing Internationalized RPC Applications
15.3.6 Writing the Evaluation Routine
Recall from Chapter 1 of the and Chapter 11 of this guide that when a prospective client
attempts to import binding information from a namespace entry that it looks up by name,
the NSI import routine checks the binding for compatibility with the client by comparing
interface UUIDs and protocol sequences. If the UUIDs match and the protocol
sequences are compatible, the NSI operation considers the binding handle contained in
the server entry to be compatible and returns it to the client. Internationalized clients
need to perform additional compatibility checking on potential server bindings: they
need to evaluate the server for character and code set compatibility.
The purpose of the character and code set compatiblity evaluation routine is to determine
Whether the character set the server supports is compatible with the client’s character
set, since incompatible character sets result in unacceptable data loss during
character conversion.
The level of code set compatibility between client and server, which determines the
conversion method that the client and server will use when transferring character data
between them.
A conversion method is a process for converting one code set into another. There are
four conversion methods:
Receiver Makes It Right (RMIR)—The recipient of the data is responsible for
converting the data from the sender’s code set to its own code set. This is the method
that the RPC communications protocol uses to convert PCS character data between
ASCII and EBCDIC code sets.
Client Makes It Right (CMIR)—The client converts the input character data to be
sent to the server into the server’s code set before the data is transmitted over the
network, and converts output data received from the server from the server’s code set
into its own local code set.
Server Makes It Right (SMIR)—The server converts the input character data
received from the client into its local code set from the client’s code set and converts
output data to be sent to the client into the client’s code set before the data is
transmitted over the network.
Intermediate—Both client and server convert to a common code set. DCE defines a
default intermediate code set to be used when there is no match between the client
and server’s supported code sets; this code set is the ISO 10646 ‘‘universal’’ code
set. Sites can also specify other code sets to be used as intermediate code sets in
preference to ISO 10646; to do this, they run the csrc utility. See the csrc(8dce)
reference pages for a description of csrc utility usage.
A character and code set compatibility evaluation routine generally employs a
conversion model when determining the level of code set compatibility. A conversion
model is an ordering of conversion methods; for example, ‘‘CMIR first, then SMIR, then
intermediate.’’ Consequently, the actual conversion method used is determined at
runtime.
124245 Tandem Computers Incorporated 15 27