C# UTF8Encoding EncodingName
Description
UTF8Encoding EncodingName
When overridden in a derived
class, gets the human-readable description of the current encoding.
Syntax
UTF8Encoding.EncodingName
has the following syntax.
public virtual string EncodingName { get; }
Example
using System;/* w ww. j a v a 2 s . co m*/
using System.Text;
public class SamplesEncoding {
public static void Main() {
foreach( EncodingInfo ei in Encoding.GetEncodings() ) {
Encoding e = ei.GetEncoding();
Console.WriteLine( ei.Name );
Console.WriteLine( e.CodePage );
Console.WriteLine( e.BodyName );
Console.WriteLine( e.HeaderName );
Console.WriteLine( e.WebName );
Console.WriteLine( e.EncodingName );
}
}
}
The code above generates the following result.