Sending Messages

When a client sends a message, the message stores the character encoding name used for strings in that message. Java clients represent strings using Unicode. A message created by a Java client that does not specify an encoding will use UTF-8 as the named encoding within the message.

UTF-8 uses up to four bytes to represent each character, so a Java client can improve performance by explicitly using a single-byte character encoding, if possible.

Java clients can globally set the encoding to use with the setEncoding method or the client can set the encoding for each message with the setMessageEncoding method. For more information about these methods, see TIBCO Enterprise Message Service Java API Reference.

Typically, C clients manipulate strings using the character encoding of the machine on which they are running. The EMS C client library itself does not do any encoding or decoding of characters. When sending a message, an EMS C client application can use tibemsMsg_SetEncoding to put information into the message describing the encoding used. When receiving a message in an EMS C client application, the encoding can be retrieved using tibemsMsg_GetEncoding. Use a third party library to do the actual decoding based on the retrieved encoding information.