MSDN Library

BasicHttpBinding.TextEncoding Property

Gets or sets the character encoding that is used for the message text.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public Encoding TextEncoding { get; set; }

Property Value

Type: System.Text.Encoding
The Encoding that indicates the character encoding that is used. The default is UTF8Encoding.

The following example sets TextEncoding to Text.UnicodeEncoding.

		    BasicHttpBinding binding = new BasicHttpBinding();
		    binding.TextEncoding = System.Text.Encoding.Unicode;

The value of this property can also be set in the configuration file.


        <binding name="Binding1"
          textEncoding = "UnicodeFffeTextEncoding">

          <security mode="None" />


.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
© 2015 Microsoft