Collapse All Expand All

.NET Framework Class Library
Tibems Class See Also

[TIBCO.EMS .NET client library 6.1 documentation]

Set the character encoding for an individual message

Namespace: TIBCO.EMS
Assembly: 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

# See Also

Tibems Class
TIBCO.EMS Namespace