Gets the Windows operating system code page that most closely corresponds to the current encoding.
using System; using System.Text; public class SamplesEncoding { public static void Main() { foreach( EncodingInfo ei in Encoding.GetEncodings() ) { Encoding e = ei.GetEncoding(); Console.Write( ei.CodePage); Console.Write( ei.Name ); Console.Write( e.WindowsCodePage ); if ( ei.CodePage != e.WindowsCodePage ) Console.Write( "*" ); } } }