[TIBCO.EMS .NET client library 8.1 documentation]
Assembly: TIBCO.EMS (in TIBCO.EMS.dll)
Set the character encoding for an individual message
Namespace:
TIBCO.EMSAssembly: TIBCO.EMS (in TIBCO.EMS.dll)
Syntax
public static void SetMessageEncoding( Message message, string encodingName ) |
Public Shared Sub SetMessageEncoding ( _ message As Message, _ encodingName As String _ ) |
public: static void SetMessageEncoding( Message^ message, String^ encodingName ) |
Parameters
- message
- Type: TIBCO.EMS..::.Message
Set the encoding for this message.
- encodingName
- Type: System..::.String
The name of the encoding (for example, "utf-8"). For a list of standard encoding names, see www.iana.org.
Remarks
This encoding for an individual message overrides the global encoding. When neither a global nor an individual message encoding has been set, then EMS encodes the strings of an outbound message using the default UTF-8 encoding.
This encoding applies to all strings in message bodies (names and values), and properties (names and values). It does not apply to header names or values. The methods BytesMessage.ReadUTF and BytesMessage.WriteUTF are exempt from global and individual encoding settings.
Exceptions
Exception | Condition |
---|---|
TIBCO.EMS..::.EMSException | If the encoding is not supported |