Creating localized connections for gateway applications

If an Open Server application is acting as a gateway, it needs to ensure that a connection to a remote server uses the client’s language and the Open Server’s character set.

NoteThe Open Server’s character set does not need to be the same as the remote server’s character set, but it must be one that the remote server is capable of converting to its own. Adaptive Server can convert between any two Western European character sets and can convert between any two Japanese character sets, but it cannot convert a Western European character set to a Japanese one (and vice-versa). For example, Adaptive Server can convert between ISO 8859-1 and CP850, because both of these character sets are in the Western European language group; however, Adaptive Server cannot convert between ISO 8859-1, which is Western European, and CP 1250, which is Eastern European. Open Server can convert between any two supported character sets, whether or not they are in the same language group. However, when converting between character sets in different language groups, non-Roman characters may be lost.

The simplest way for an application to do this is to set up a properly localized CS_CONTEXT structure for each client connection and then allocate remote connections for the client within the localized context.

See “Localizing a CS_CONTEXT structure” below for information on how to localize a CS_CONTEXT structure.