C# UnicodeEncoding WindowsCodePage
Description
UnicodeEncoding WindowsCodePage
When overridden in
a derived class, gets the Windows operating system code page that most closely
corresponds to the current encoding.
Syntax
UnicodeEncoding.WindowsCodePage
has the following syntax.
public virtual int WindowsCodePage { get; }
Example
using System;// w ww . j a v a2s . c o m
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,-6} ", e.WindowsCodePage );
Console.WriteLine();
}
}
}
The code above generates the following result.