EncodingInfo Class provides basic information about an encoding.
using System;
using System.Text;
public class MainClass{
public static void Main() {
foreach( EncodingInfo ei in Encoding.GetEncodings() ) {
Encoding e = ei.GetEncoding();
Console.Write( "{0,-15}", ei.CodePage );
Console.Write( "{0,-25}", ei.Name );
Console.Write( "{0,-25}", ei.DisplayName );
}
}
}
Related examples in the same category