Encoding.WebName Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

When overridden in a derived class, gets the name registered with the Internet Assigned Numbers Authority (IANA) for the current encoding.

Namespace:   System.Text
Assembly:  mscorlib (in mscorlib.dll)

abstract WebName : string with get
override WebName : string with get

Property Value

Type: System.String

The IANA name for the current Encoding.

The WebName property is the same as the Name property.

Note that WebName returns an IANA-registered name for the encoding. When its value is the name of a standard, the implementation of the encoding might not conform in full to that standard. The HeaderName property defines a different encoding that might work better for e-mail headers. However, most apps should use WebName instead.

For more information on the IANA, go to www.iana.org.

The Encoding.WebName is the same as the EncodingInfo.Name returned by Encoding.GetEncodings. Some of the web names are duplicates; see the remarks for Encoding.GetEncodings for more information.

The following example includes the WebName in an HTML header.

No code example is currently available or this language may not be supported.

The following example retrieves the different names for each encoding and displays the encodings with one or more names that are different from EncodingInfo.Name. It displays EncodingName but does not compare against it.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top