Returns an array that contains all encodings.
using System;
using System.Text;
public class SamplesEncoding {
public static void Main() {
foreach( EncodingInfo ei in Encoding.GetEncodings() ) {
Encoding e = ei.GetEncoding();
Console.Write( "{0,-6} {1,-25} ", ei.CodePage, ei.Name );
Console.Write( "{0,-8} {1,-8} ", e.IsBrowserDisplay, e.IsBrowserSave );
Console.Write( "{0,-8} {1,-8} ", e.IsMailNewsDisplay, e.IsMailNewsSave );
Console.WriteLine( "{0,-8} {1,-8} ", e.IsSingleByte, e.IsReadOnly );
}
}
}
Related examples in the same category